Clean up XML entities in doc strings

This commit is contained in:
Dirkjan Ochtman 2023-03-02 14:27:26 +01:00
parent 3905881b55
commit ef2abd64c6
33 changed files with 233 additions and 233 deletions

View File

@ -32,7 +32,7 @@ impl Extension for NoExtension {
type Response = NoExtension; type Response = NoExtension;
} }
/// The <option> type in EPP XML login requests /// The `<option>` type in EPP XML login requests
#[derive(Debug, Eq, FromXml, PartialEq, ToXml)] #[derive(Debug, Eq, FromXml, PartialEq, ToXml)]
#[xml(rename = "options", ns(EPP_XMLNS))] #[xml(rename = "options", ns(EPP_XMLNS))]
pub struct Options<'a> { pub struct Options<'a> {
@ -52,23 +52,23 @@ impl<'a> Options<'a> {
} }
} }
/// The <svcExtension> type in EPP XML /// The `<svcExtension>` type in EPP XML
#[derive(Debug, Eq, FromXml, PartialEq, ToXml)] #[derive(Debug, Eq, FromXml, PartialEq, ToXml)]
#[xml(rename = "svcExtension", ns(EPP_XMLNS))] #[xml(rename = "svcExtension", ns(EPP_XMLNS))]
pub struct ServiceExtension<'a> { pub struct ServiceExtension<'a> {
/// The service extension URIs being represented by <extURI> in EPP XML /// The service extension URIs being represented by `<extURI>` in EPP XML
#[xml(rename = "extURI")] #[xml(rename = "extURI")]
pub ext_uris: Option<Vec<Cow<'a, str>>>, pub ext_uris: Option<Vec<Cow<'a, str>>>,
} }
/// The <svcs> type in EPP XML /// The `<svcs>` type in EPP XML
#[derive(Debug, Eq, FromXml, PartialEq, ToXml)] #[derive(Debug, Eq, FromXml, PartialEq, ToXml)]
#[xml(rename = "svcs", ns(EPP_XMLNS))] #[xml(rename = "svcs", ns(EPP_XMLNS))]
pub struct Services<'a> { pub struct Services<'a> {
/// The service URIs being used by this EPP session represented by <objURI> in EPP XML /// The service URIs being used by this EPP session represented by `<objURI>` in EPP XML
#[xml(rename = "objURI")] #[xml(rename = "objURI")]
pub obj_uris: Vec<Cow<'a, str>>, pub obj_uris: Vec<Cow<'a, str>>,
// The <svcExtension> being used in this EPP session // The `<svcExtension>` being used in this EPP session
#[xml(rename = "svcExtension")] #[xml(rename = "svcExtension")]
pub svc_ext: Option<ServiceExtension<'a>>, pub svc_ext: Option<ServiceExtension<'a>>,
} }

View File

@ -17,7 +17,7 @@ impl<'a> Command for ContactCheck<'a> {
// Request // Request
/// Type that represents the &lt;check&gt; command for contact transactions /// Type that represents the `<check>` command for contact transactions
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "check", ns(XMLNS))] #[xml(rename = "check", ns(XMLNS))]
struct ContactList<'a> { struct ContactList<'a> {
@ -56,11 +56,11 @@ pub struct Checked {
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "cd", ns(XMLNS))] #[xml(rename = "cd", ns(XMLNS))]
pub struct CheckedContact { pub struct CheckedContact {
/// Data under the &lt;cd&gt; tag /// Data under the `<cd>` tag
pub inner: Checked, pub inner: Checked,
} }
/// Type that represents the &lt;chkData&gt; tag for host check response /// Type that represents the `<chkData>` tag for host check response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "chkData", ns(XMLNS))] #[xml(rename = "chkData", ns(XMLNS))]
pub struct CheckData { pub struct CheckData {

View File

@ -16,29 +16,29 @@ impl<'a> Command for ContactCreate<'a> {
// Request // Request
/// Type for elements under the contact &lt;create&gt; tag /// Type for elements under the contact `<create>` tag
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "create", ns(XMLNS))] #[xml(rename = "create", ns(XMLNS))]
pub struct ContactCreateRequest<'a> { pub struct ContactCreateRequest<'a> {
/// Contact &lt;id&gt; tag /// Contact `<id>` tag
id: &'a str, id: &'a str,
/// Contact &lt;postalInfo&gt; tag /// Contact `<postalInfo>` tag
postal_info: PostalInfo<'a>, postal_info: PostalInfo<'a>,
/// Contact &lt;voice&gt; tag /// Contact `<voice>` tag
voice: Voice<'a>, voice: Voice<'a>,
/// Contact &lt;fax&gt; tag,] /// Contact `<fax>` tag,]
fax: Option<Fax<'a>>, fax: Option<Fax<'a>>,
/// Contact &lt;email&gt; tag /// Contact `<email>` tag
email: &'a str, email: &'a str,
/// Contact &lt;authInfo&gt; tag /// Contact `<authInfo>` tag
auth_info: ContactAuthInfo<'a>, auth_info: ContactAuthInfo<'a>,
} }
/// Type for EPP XML &lt;create&gt; command for contacts /// Type for EPP XML `<create>` command for contacts
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "create", ns(EPP_XMLNS))] #[xml(rename = "create", ns(EPP_XMLNS))]
pub struct ContactCreate<'a> { pub struct ContactCreate<'a> {
/// Data for &lt;create&gt; command for contact /// Data for `<create>` command for contact
pub contact: ContactCreateRequest<'a>, pub contact: ContactCreateRequest<'a>,
} }
@ -62,7 +62,7 @@ impl<'a> ContactCreate<'a> {
} }
} }
/// Sets the &lt;fax&gt; data for the request /// Sets the `<fax>` data for the request
pub fn set_fax(&mut self, fax: Fax<'a>) { pub fn set_fax(&mut self, fax: Fax<'a>) {
self.contact.fax = Some(fax); self.contact.fax = Some(fax);
} }
@ -70,7 +70,7 @@ impl<'a> ContactCreate<'a> {
// Response // Response
/// Type that represents the &lt;creData&gt; tag for contact create response /// Type that represents the `<creData>` tag for contact create response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "creData", ns(XMLNS))] #[xml(rename = "creData", ns(XMLNS))]
pub struct CreateData { pub struct CreateData {

View File

@ -13,7 +13,7 @@ impl<'a> Command for ContactDelete<'a> {
const COMMAND: &'static str = "delete"; const COMMAND: &'static str = "delete";
} }
/// Type containing the data for the &lt;delete&gt; tag for contacts /// Type containing the data for the `<delete>` tag for contacts
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "delete", ns(XMLNS))] #[xml(rename = "delete", ns(XMLNS))]
pub struct ContactDeleteRequest<'a> { pub struct ContactDeleteRequest<'a> {
@ -21,11 +21,11 @@ pub struct ContactDeleteRequest<'a> {
id: &'a str, id: &'a str,
} }
/// The &lt;delete&gt; type for the contact delete EPP command /// The `<delete>` type for the contact delete EPP command
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "delete", ns(EPP_XMLNS))] #[xml(rename = "delete", ns(EPP_XMLNS))]
pub struct ContactDelete<'a> { pub struct ContactDelete<'a> {
/// The data for the &lt;delete&gt; tag for a contact delete command /// The data for the `<delete>` tag for a contact delete command
contact: ContactDeleteRequest<'a>, contact: ContactDeleteRequest<'a>,
} }

View File

@ -16,21 +16,21 @@ impl<'a> Command for ContactInfo<'a> {
// Request // Request
/// Type for elements under the contact &lt;info&gt; tag /// Type for elements under the contact `<info>` tag
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "info", ns(XMLNS))] #[xml(rename = "info", ns(XMLNS))]
pub struct ContactInfoRequest<'a> { pub struct ContactInfoRequest<'a> {
/// The contact id for the info command /// The contact id for the info command
id: &'a str, id: &'a str,
/// The &lt;authInfo&gt; data /// The `<authInfo>` data
auth_info: ContactAuthInfo<'a>, auth_info: ContactAuthInfo<'a>,
} }
/// Type for EPP XML &lt;info&gt; command for contacts /// Type for EPP XML `<info>` command for contacts
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "info", ns(EPP_XMLNS))] #[xml(rename = "info", ns(EPP_XMLNS))]
pub struct ContactInfo<'a> { pub struct ContactInfo<'a> {
/// Data for &lt;info&gt; command for contact /// Data for `<info>` command for contact
info: ContactInfoRequest<'a>, info: ContactInfoRequest<'a>,
} }
@ -47,7 +47,7 @@ impl<'a> ContactInfo<'a> {
// Response // Response
/// Type that represents the &lt;infData&gt; tag for contact check response /// Type that represents the `<infData>` tag for contact check response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "infData", ns(XMLNS))] #[xml(rename = "infData", ns(XMLNS))]
pub struct InfoData { pub struct InfoData {

View File

@ -74,11 +74,11 @@ impl std::ops::Deref for Country {
} }
} }
/// The &lt;authInfo&gt; tag for domain and contact transactions /// The `<authInfo>` tag for domain and contact transactions
#[derive(Debug, Clone, FromXml, ToXml)] #[derive(Debug, Clone, FromXml, ToXml)]
#[xml(rename = "authInfo", ns(XMLNS))] #[xml(rename = "authInfo", ns(XMLNS))]
pub struct ContactAuthInfo<'a> { pub struct ContactAuthInfo<'a> {
/// The &lt;pw&gt; tag under &lt;authInfo&gt; /// The `<pw>` tag under `<authInfo>`
#[xml(rename = "pw")] #[xml(rename = "pw")]
pub password: Cow<'a, str>, pub password: Cow<'a, str>,
} }
@ -92,14 +92,14 @@ impl<'a> ContactAuthInfo<'a> {
} }
} }
/// The data for &lt;voice&gt; types on domain transactions /// The data for `<voice>` types on domain transactions
#[derive(Debug, Clone, FromXml, ToXml)] #[derive(Debug, Clone, FromXml, ToXml)]
#[xml(rename = "voice", ns(XMLNS))] #[xml(rename = "voice", ns(XMLNS))]
pub struct Voice<'a> { pub struct Voice<'a> {
/// The value of the 'x' attr on &lt;voice&gt; and &lt;fax&gt; tags /// The value of the 'x' attr on `<voice>` and `<fax>` tags
#[xml(rename = "x", attribute)] #[xml(rename = "x", attribute)]
pub extension: Option<Cow<'a, str>>, pub extension: Option<Cow<'a, str>>,
/// The inner text on the &lt;voice&gt; and &lt;fax&gt; tags /// The inner text on the `<voice>` and `<fax>` tags
#[xml(direct)] #[xml(direct)]
pub number: Cow<'a, str>, pub number: Cow<'a, str>,
} }
@ -119,14 +119,14 @@ impl<'a> Voice<'a> {
} }
} }
/// The data for &lt;voice&gt; and &lt;fax&gt; types on domain transactions /// The data for `<voice>` and `<fax>` types on domain transactions
#[derive(Debug, Clone, FromXml, ToXml)] #[derive(Debug, Clone, FromXml, ToXml)]
#[xml(rename = "fax", ns(XMLNS))] #[xml(rename = "fax", ns(XMLNS))]
pub struct Fax<'a> { pub struct Fax<'a> {
/// The value of the 'x' attr on &lt;voice&gt; and &lt;fax&gt; tags /// The value of the 'x' attr on `<voice>` and `<fax>` tags
#[xml(rename = "x", attribute)] #[xml(rename = "x", attribute)]
pub extension: Option<Cow<'a, str>>, pub extension: Option<Cow<'a, str>>,
/// The inner text on the &lt;voice&gt; and &lt;fax&gt; tags /// The inner text on the `<voice>` and `<fax>` tags
#[xml(direct)] #[xml(direct)]
pub number: Cow<'a, str>, pub number: Cow<'a, str>,
} }
@ -146,21 +146,21 @@ impl<'a> Fax<'a> {
} }
} }
/// The &lt;addr&gt; type on contact transactions /// The `<addr>` type on contact transactions
#[derive(Debug, Clone, FromXml, ToXml)] #[derive(Debug, Clone, FromXml, ToXml)]
#[xml(rename = "addr", ns(XMLNS))] #[xml(rename = "addr", ns(XMLNS))]
pub struct Address<'a> { pub struct Address<'a> {
/// The &lt;street&gt; tags under &lt;addr&gt; /// The `<street>` tags under `<addr>`
pub street: Vec<Cow<'a, str>>, pub street: Vec<Cow<'a, str>>,
/// The &lt;city&gt; tag under &lt;addr&gt; /// The `<city>` tag under `<addr>`
pub city: Cow<'a, str>, pub city: Cow<'a, str>,
/// The &lt;sp&gt; tag under &lt;addr&gt; /// The `<sp>` tag under `<addr>`
#[xml(rename = "sp")] #[xml(rename = "sp")]
pub province: Cow<'a, str>, pub province: Cow<'a, str>,
/// The &lt;pc&gt; tag under &lt;addr&gt; /// The `<pc>` tag under `<addr>`
#[xml(rename = "pc")] #[xml(rename = "pc")]
pub postal_code: Cow<'a, str>, pub postal_code: Cow<'a, str>,
/// The &lt;cc&gt; tag under &lt;addr&gt; /// The `<cc>` tag under `<addr>`
#[xml(rename = "cc")] #[xml(rename = "cc")]
pub country: Country, pub country: Country,
} }
@ -186,19 +186,19 @@ impl<'a> Address<'a> {
} }
} }
/// The &lt;postalInfo&gt; type on contact transactions /// The `<postalInfo>` type on contact transactions
#[derive(Debug, Clone, FromXml, ToXml)] #[derive(Debug, Clone, FromXml, ToXml)]
#[xml(rename = "postalInfo", ns(XMLNS))] #[xml(rename = "postalInfo", ns(XMLNS))]
pub struct PostalInfo<'a> { pub struct PostalInfo<'a> {
/// The 'type' attr on &lt;postalInfo&gt; /// The 'type' attr on `<postalInfo>`
#[xml(rename = "type", attribute)] #[xml(rename = "type", attribute)]
pub info_type: Cow<'a, str>, pub info_type: Cow<'a, str>,
/// The &lt;name&gt; tag under &lt;postalInfo&gt; /// The `<name>` tag under `<postalInfo>`
pub name: Cow<'a, str>, pub name: Cow<'a, str>,
/// The &lt;org&gt; tag under &lt;postalInfo&gt; /// The `<org>` tag under `<postalInfo>`
#[xml(rename = "org")] #[xml(rename = "org")]
pub organization: Cow<'a, str>, pub organization: Cow<'a, str>,
/// The &lt;addr&gt; tag under &lt;postalInfo&gt; /// The `<addr>` tag under `<postalInfo>`
pub address: Address<'a>, pub address: Address<'a>,
} }
@ -219,11 +219,11 @@ impl<'a> PostalInfo<'a> {
} }
} }
/// The &lt;status&gt; type on contact transactions /// The `<status>` type on contact transactions
#[derive(Debug, FromXml, ToXml)] #[derive(Debug, FromXml, ToXml)]
#[xml(rename = "status", ns(XMLNS))] #[xml(rename = "status", ns(XMLNS))]
pub struct Status<'a> { pub struct Status<'a> {
/// The status name, represented by the 's' attr on &lt;status&gt; tags /// The status name, represented by the 's' attr on `<status>` tags
#[xml(attribute, rename = "s")] #[xml(attribute, rename = "s")]
pub status: Cow<'a, str>, pub status: Cow<'a, str>,
} }

View File

@ -25,7 +25,7 @@ impl<'a> ContactUpdate<'a> {
} }
} }
/// Sets the data for the &lt;chg&gt; tag for the contact update request /// Sets the data for the `<chg>` tag for the contact update request
pub fn set_info( pub fn set_info(
&mut self, &mut self,
email: &'a str, email: &'a str,
@ -42,25 +42,25 @@ impl<'a> ContactUpdate<'a> {
}); });
} }
/// Sets the data for the &lt;fax&gt; tag under &lt;chg&gt; for the contact update request /// Sets the data for the `<fax>` tag under `<chg>` for the contact update request
pub fn set_fax(&mut self, fax: Fax<'a>) { pub fn set_fax(&mut self, fax: Fax<'a>) {
if let Some(info) = &mut self.contact.change_info { if let Some(info) = &mut self.contact.change_info {
info.fax = Some(fax) info.fax = Some(fax)
} }
} }
/// Sets the data for the &lt;add&gt; tag for the contact update request /// Sets the data for the `<add>` tag for the contact update request
pub fn add(&mut self, statuses: &'a [Status]) { pub fn add(&mut self, statuses: &'a [Status]) {
self.contact.add_statuses = Some(AddStatuses { statuses }); self.contact.add_statuses = Some(AddStatuses { statuses });
} }
/// Sets the data for the &lt;rem&gt; tag for the contact update request /// Sets the data for the `<rem>` tag for the contact update request
pub fn remove(&mut self, statuses: &'a [Status]) { pub fn remove(&mut self, statuses: &'a [Status]) {
self.contact.remove_statuses = Some(RemoveStatuses { statuses }); self.contact.remove_statuses = Some(RemoveStatuses { statuses });
} }
} }
/// Type for elements under the &lt;chg&gt; tag for contact update request /// Type for elements under the `<chg>` tag for contact update request
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "chg", ns(XMLNS))] #[xml(rename = "chg", ns(XMLNS))]
pub struct ContactChangeInfo<'a> { pub struct ContactChangeInfo<'a> {
@ -71,7 +71,7 @@ pub struct ContactChangeInfo<'a> {
auth_info: Option<ContactAuthInfo<'a>>, auth_info: Option<ContactAuthInfo<'a>>,
} }
/// Type for list of elements of the &lt;status&gt; tag for contact update request /// Type for list of elements of the `<status>` tag for contact update request
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
pub struct StatusList<'a> { pub struct StatusList<'a> {
status: &'a [Status<'a>], status: &'a [Status<'a>],
@ -89,7 +89,7 @@ struct RemoveStatuses<'a> {
statuses: &'a [Status<'a>], statuses: &'a [Status<'a>],
} }
/// Type for elements under the contact &lt;update&gt; tag /// Type for elements under the contact `<update>` tag
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "update", ns(XMLNS))] #[xml(rename = "update", ns(XMLNS))]
pub struct ContactUpdateRequest<'a> { pub struct ContactUpdateRequest<'a> {
@ -100,11 +100,11 @@ pub struct ContactUpdateRequest<'a> {
change_info: Option<ContactChangeInfo<'a>>, change_info: Option<ContactChangeInfo<'a>>,
} }
/// Type for EPP XML &lt;update&gt; command for contacts /// Type for EPP XML `<update>` command for contacts
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "update", ns(EPP_XMLNS))] #[xml(rename = "update", ns(EPP_XMLNS))]
pub struct ContactUpdate<'a> { pub struct ContactUpdate<'a> {
/// The data under the &lt;update&gt; tag for the contact update /// The data under the `<update>` tag for the contact update
contact: ContactUpdateRequest<'a>, contact: ContactUpdateRequest<'a>,
} }

View File

@ -55,12 +55,12 @@ pub struct Checked {
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "cd", ns(XMLNS))] #[xml(rename = "cd", ns(XMLNS))]
pub struct CheckedDomain { pub struct CheckedDomain {
/// Data under the &lt;cd&gt; tag /// Data under the `<cd>` tag
#[xml(rename = "cd")] #[xml(rename = "cd")]
pub inner: Checked, pub inner: Checked,
} }
/// Type that represents the &lt;chkData&gt; tag for host check response /// Type that represents the `<chkData>` tag for host check response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "chkData", ns(XMLNS))] #[xml(rename = "chkData", ns(XMLNS))]
pub struct CheckData { pub struct CheckData {

View File

@ -16,7 +16,7 @@ impl<'a> Command for DomainCreate<'a> {
// Request // Request
/// Type for elements under the domain &lt;create&gt; tag /// Type for elements under the domain `<create>` tag
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "create", ns(XMLNS))] #[xml(rename = "create", ns(XMLNS))]
pub struct DomainCreateRequestData<'a> { pub struct DomainCreateRequestData<'a> {
@ -36,7 +36,7 @@ pub struct DomainCreateRequestData<'a> {
} }
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
/// Type for EPP XML &lt;create&gt; command for domains /// Type for EPP XML `<create>` command for domains
#[xml(rename = "create", ns(EPP_XMLNS))] #[xml(rename = "create", ns(EPP_XMLNS))]
pub struct DomainCreate<'a> { pub struct DomainCreate<'a> {
/// The data for the domain to be created with /// The data for the domain to be created with
@ -69,7 +69,7 @@ impl<'a> DomainCreate<'a> {
// Response // Response
/// Type that represents the &lt;chkData&gt; tag for domain create response /// Type that represents the `<chkData>` tag for domain create response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "creData", ns(XMLNS))] #[xml(rename = "creData", ns(XMLNS))]
pub struct CreateData { pub struct CreateData {

View File

@ -21,7 +21,7 @@ impl<'a> DomainDelete<'a> {
} }
} }
/// Type for &lt;name&gt; element under the domain &lt;delete&gt; tag /// Type for `<name>` element under the domain `<delete>` tag
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "delete", ns(XMLNS))] #[xml(rename = "delete", ns(XMLNS))]
pub struct DomainDeleteRequestData<'a> { pub struct DomainDeleteRequestData<'a> {
@ -30,10 +30,10 @@ pub struct DomainDeleteRequestData<'a> {
} }
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
/// Type for EPP XML &lt;delete&gt; command for domains /// Type for EPP XML `<delete>` command for domains
#[xml(rename = "delete", ns(EPP_XMLNS))] #[xml(rename = "delete", ns(EPP_XMLNS))]
pub struct DomainDelete<'a> { pub struct DomainDelete<'a> {
/// The data under the &lt;delete&gt; tag for domain deletion /// The data under the `<delete>` tag for domain deletion
domain: DomainDeleteRequestData<'a>, domain: DomainDeleteRequestData<'a>,
} }

View File

@ -29,7 +29,7 @@ impl<'a> DomainInfo<'a> {
// Request // Request
/// Type for data under the &lt;name&gt; element tag for the domain &lt;info&gt; tag /// Type for data under the `<name>` element tag for the domain `<info>` tag
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "name", ns(XMLNS))] #[xml(rename = "name", ns(XMLNS))]
pub struct Domain<'a> { pub struct Domain<'a> {
@ -41,7 +41,7 @@ pub struct Domain<'a> {
name: &'a str, name: &'a str,
} }
/// Type for &lt;name&gt; element under the domain &lt;info&gt; tag /// Type for `<name>` element under the domain `<info>` tag
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "info", ns(XMLNS))] #[xml(rename = "info", ns(XMLNS))]
pub struct DomainInfoRequestData<'a> { pub struct DomainInfoRequestData<'a> {
@ -52,10 +52,10 @@ pub struct DomainInfoRequestData<'a> {
} }
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
/// Type for EPP XML &lt;info&gt; command for domains /// Type for EPP XML `<info>` command for domains
#[xml(rename = "info", ns(EPP_XMLNS))] #[xml(rename = "info", ns(EPP_XMLNS))]
pub struct DomainInfo<'a> { pub struct DomainInfo<'a> {
/// The data under the &lt;info&gt; tag for domain info /// The data under the `<info>` tag for domain info
info: DomainInfoRequestData<'a>, info: DomainInfoRequestData<'a>,
} }
@ -65,14 +65,14 @@ pub struct DomainInfo<'a> {
/// domain info response /// domain info response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
pub struct DomainNsList { pub struct DomainNsList {
/// List of &lt;hostObj&gt; ns elements /// List of `<hostObj>` ns elements
#[xml(rename = "hostObj")] #[xml(rename = "hostObj")]
pub host_obj: Option<Vec<String>>, pub host_obj: Option<Vec<String>>,
/// List of &lt;hostAttr&gt; ns elements /// List of `<hostAttr>` ns elements
pub host_attr: Option<Vec<HostAttr<'static>>>, pub host_attr: Option<Vec<HostAttr<'static>>>,
} }
/// Type that represents the &lt;infData&gt; tag for domain info response /// Type that represents the `<infData>` tag for domain info response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "infData", ns(XMLNS))] #[xml(rename = "infData", ns(XMLNS))]
pub struct InfoData { pub struct InfoData {

View File

@ -35,14 +35,14 @@ pub use update::DomainUpdate;
pub const XMLNS: &str = "urn:ietf:params:xml:ns:domain-1.0"; pub const XMLNS: &str = "urn:ietf:params:xml:ns:domain-1.0";
/// The &lt;hostAttr&gt; type for domain transactions /// The `<hostAttr>` type for domain transactions
#[derive(Clone, Debug, Eq, FromXml, PartialEq, ToXml)] #[derive(Clone, Debug, Eq, FromXml, PartialEq, ToXml)]
#[xml(rename = "hostAttr", ns(XMLNS))] #[xml(rename = "hostAttr", ns(XMLNS))]
pub struct HostAttr<'a> { pub struct HostAttr<'a> {
/// The &lt;hostName&gt; tag /// The `<hostName>` tag
#[xml(rename = "hostName")] #[xml(rename = "hostName")]
pub name: Cow<'a, str>, pub name: Cow<'a, str>,
/// The &lt;hostAddr&gt; tags /// The `<hostAddr>` tags
#[xml( #[xml(
rename = "hostAddr", rename = "hostAddr",
serialize_with = "serialize_host_addrs_option", serialize_with = "serialize_host_addrs_option",
@ -79,7 +79,7 @@ fn deserialize_host_addrs_option<'xml>(
Ok(()) Ok(())
} }
/// The &lt;hostAddr&gt; types domain or host transactions /// The `<hostAddr>` types domain or host transactions
#[derive(Debug, FromXml, ToXml)] #[derive(Debug, FromXml, ToXml)]
#[xml(rename = "hostAddr", ns(super::domain::XMLNS))] #[xml(rename = "hostAddr", ns(super::domain::XMLNS))]
pub(crate) struct HostAddr<'a> { pub(crate) struct HostAddr<'a> {
@ -137,7 +137,7 @@ pub struct NameServers<'a> {
pub ns: Cow<'a, [HostInfo<'a>]>, pub ns: Cow<'a, [HostInfo<'a>]>,
} }
/// The &lt;contact&gt; type on domain creation and update requests /// The `<contact>` type on domain creation and update requests
#[derive(Debug, FromXml, ToXml)] #[derive(Debug, FromXml, ToXml)]
#[xml(rename = "contact", ns(XMLNS))] #[xml(rename = "contact", ns(XMLNS))]
pub struct DomainContact<'a> { pub struct DomainContact<'a> {
@ -149,7 +149,7 @@ pub struct DomainContact<'a> {
pub id: Cow<'a, str>, pub id: Cow<'a, str>,
} }
/// The &lt;period&gt; type for registration, renewal or transfer on domain transactions /// The `<period>` type for registration, renewal or transfer on domain transactions
#[derive(Clone, Copy, Debug, ToXml)] #[derive(Clone, Copy, Debug, ToXml)]
#[xml(rename = "period", ns(XMLNS))] #[xml(rename = "period", ns(XMLNS))]
pub struct Period { pub struct Period {
@ -205,11 +205,11 @@ pub const SIX_MONTHS: Period = Period {
length: 6, length: 6,
}; };
/// The &lt;authInfo&gt; tag for domain and contact transactions /// The `<authInfo>` tag for domain and contact transactions
#[derive(Clone, Debug, FromXml, ToXml)] #[derive(Clone, Debug, FromXml, ToXml)]
#[xml(rename = "authInfo", ns(XMLNS))] #[xml(rename = "authInfo", ns(XMLNS))]
pub struct DomainAuthInfo<'a> { pub struct DomainAuthInfo<'a> {
/// The &lt;pw&gt; tag under &lt;authInfo&gt; /// The `<pw>` tag under `<authInfo>`
#[xml(rename = "pw")] #[xml(rename = "pw")]
pub password: Cow<'a, str>, pub password: Cow<'a, str>,
} }
@ -223,11 +223,11 @@ impl<'a> DomainAuthInfo<'a> {
} }
} }
/// The &lt;status&gt; type on contact transactions /// The `<status>` type on contact transactions
#[derive(Debug, FromXml, ToXml)] #[derive(Debug, FromXml, ToXml)]
#[xml(rename = "status", ns(XMLNS))] #[xml(rename = "status", ns(XMLNS))]
pub struct Status<'a> { pub struct Status<'a> {
/// The status name, represented by the 's' attr on &lt;status&gt; tags /// The status name, represented by the 's' attr on `<status>` tags
#[xml(attribute, rename = "s")] #[xml(attribute, rename = "s")]
pub status: Cow<'a, str>, pub status: Cow<'a, str>,
} }

View File

@ -28,7 +28,7 @@ impl<'a> DomainRenew<'a> {
// Request // Request
/// Type for data under the domain &lt;renew&gt; tag /// Type for data under the domain `<renew>` tag
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "renew", ns(XMLNS))] #[xml(rename = "renew", ns(XMLNS))]
pub struct DomainRenewRequestData<'a> { pub struct DomainRenewRequestData<'a> {
@ -42,17 +42,17 @@ pub struct DomainRenewRequestData<'a> {
} }
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
/// Type for EPP XML &lt;renew&gt; command for domains /// Type for EPP XML `<renew>` command for domains
#[xml(rename = "renew", ns(EPP_XMLNS))] #[xml(rename = "renew", ns(EPP_XMLNS))]
pub struct DomainRenew<'a> { pub struct DomainRenew<'a> {
/// The data under the &lt;renew&gt; tag for the domain renewal /// The data under the `<renew>` tag for the domain renewal
#[xml(rename = "renew")] #[xml(rename = "renew")]
domain: DomainRenewRequestData<'a>, domain: DomainRenewRequestData<'a>,
} }
// Response // Response
/// Type that represents the &lt;renData&gt; tag for domain renew response /// Type that represents the `<renData>` tag for domain renew response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "renData", ns(XMLNS))] #[xml(rename = "renData", ns(XMLNS))]
pub struct RenewData { pub struct RenewData {

View File

@ -64,7 +64,7 @@ impl<'a> DomainTransfer<'a> {
// Request // Request
/// Type for elements under the domain &lt;transfer&gt; tag /// Type for elements under the domain `<transfer>` tag
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "transfer", ns(XMLNS))] #[xml(rename = "transfer", ns(XMLNS))]
pub struct DomainTransferReqData<'a> { pub struct DomainTransferReqData<'a> {
@ -81,19 +81,19 @@ pub struct DomainTransferReqData<'a> {
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "transfer", ns(EPP_XMLNS))] #[xml(rename = "transfer", ns(EPP_XMLNS))]
/// Type for EPP XML &lt;transfer&gt; command for domains /// Type for EPP XML `<transfer>` command for domains
pub struct DomainTransfer<'a> { pub struct DomainTransfer<'a> {
/// The transfer operation to perform indicated by the 'op' attr /// The transfer operation to perform indicated by the 'op' attr
/// The values are one of transfer or query /// The values are one of transfer or query
#[xml(rename = "op", attribute)] #[xml(rename = "op", attribute)]
operation: &'a str, operation: &'a str,
/// The data under the &lt;transfer&gt; tag in the transfer request /// The data under the `<transfer>` tag in the transfer request
domain: DomainTransferReqData<'a>, domain: DomainTransferReqData<'a>,
} }
// Response // Response
/// Type that represents the &lt;trnData&gt; tag for domain transfer response /// Type that represents the `<trnData>` tag for domain transfer response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "trnData", ns(XMLNS))] #[xml(rename = "trnData", ns(XMLNS))]
pub struct TransferData { pub struct TransferData {

View File

@ -27,23 +27,23 @@ impl<'a> DomainUpdate<'a> {
} }
} }
/// Sets the data for the &lt;chg&gt; tag /// Sets the data for the `<chg>` tag
pub fn info(&mut self, info: DomainChangeInfo<'a>) { pub fn info(&mut self, info: DomainChangeInfo<'a>) {
self.domain.change_info = Some(info); self.domain.change_info = Some(info);
} }
/// Sets the data for the &lt;add&gt; tag /// Sets the data for the `<add>` tag
pub fn add(&mut self, add: DomainAdd<'a>) { pub fn add(&mut self, add: DomainAdd<'a>) {
self.domain.add = Some(add); self.domain.add = Some(add);
} }
/// Sets the data for the &lt;rem&gt; tag /// Sets the data for the `<rem>` tag
pub fn remove(&mut self, remove: DomainRemove<'a>) { pub fn remove(&mut self, remove: DomainRemove<'a>) {
self.domain.remove = Some(remove); self.domain.remove = Some(remove);
} }
} }
/// Type for elements under the &lt;chg&gt; tag for domain update /// Type for elements under the `<chg>` tag for domain update
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "chg", ns(XMLNS))] #[xml(rename = "chg", ns(XMLNS))]
pub struct DomainChangeInfo<'a> { pub struct DomainChangeInfo<'a> {
@ -53,7 +53,7 @@ pub struct DomainChangeInfo<'a> {
pub auth_info: Option<DomainAuthInfo<'a>>, pub auth_info: Option<DomainAuthInfo<'a>>,
} }
/// Type for elements under the &lt;add&gt; and &lt;rem&gt; tags for domain update /// Type for elements under the `<add>` and `<rem>` tags for domain update
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "add", ns(XMLNS))] #[xml(rename = "add", ns(XMLNS))]
pub struct DomainAdd<'a> { pub struct DomainAdd<'a> {
@ -66,7 +66,7 @@ pub struct DomainAdd<'a> {
pub statuses: Option<&'a [Status<'a>]>, pub statuses: Option<&'a [Status<'a>]>,
} }
/// Type for elements under the &lt;add&gt; and &lt;rem&gt; tags for domain update /// Type for elements under the `<add>` and `<rem>` tags for domain update
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "rem", ns(XMLNS))] #[xml(rename = "rem", ns(XMLNS))]
pub struct DomainRemove<'a> { pub struct DomainRemove<'a> {
@ -79,7 +79,7 @@ pub struct DomainRemove<'a> {
pub statuses: Option<&'a [Status<'a>]>, pub statuses: Option<&'a [Status<'a>]>,
} }
/// Type for elements under the &lt;update&gt; tag for domain update /// Type for elements under the `<update>` tag for domain update
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "update", ns(XMLNS))] #[xml(rename = "update", ns(XMLNS))]
pub struct DomainUpdateRequestData<'a> { pub struct DomainUpdateRequestData<'a> {
@ -91,12 +91,12 @@ pub struct DomainUpdateRequestData<'a> {
/// `DomainAddRemove` Object containing the list of elements to be removed /// `DomainAddRemove` Object containing the list of elements to be removed
/// from the domain /// from the domain
pub remove: Option<DomainRemove<'a>>, pub remove: Option<DomainRemove<'a>>,
/// The data under the &lt;chg&gt; tag for domain update /// The data under the `<chg>` tag for domain update
#[xml(rename = "domain:chg")] #[xml(rename = "domain:chg")]
pub change_info: Option<DomainChangeInfo<'a>>, pub change_info: Option<DomainChangeInfo<'a>>,
} }
/// Type for EPP XML &lt;update&gt; command for domains /// Type for EPP XML `<update>` command for domains
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "update", ns(EPP_XMLNS))] #[xml(rename = "update", ns(EPP_XMLNS))]
pub struct DomainUpdate<'a> { pub struct DomainUpdate<'a> {

View File

@ -94,7 +94,7 @@ pub struct UpdateWithNameStore<'a> {
pub namestore: NameStore<'a>, pub namestore: NameStore<'a>,
} }
/// Type for EPP XML &lt;consolidate&gt; extension /// Type for EPP XML `<consolidate>` extension
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "update", ns(XMLNS))] #[xml(rename = "update", ns(XMLNS))]
pub struct Update { pub struct Update {

View File

@ -1,6 +1,6 @@
//! Low Balance Mapping for the Extensible Provisioning Protocol (EPP) //! Low Balance Mapping for the Extensible Provisioning Protocol (EPP)
//! //!
//! https://www.verisign.com/assets/epp-sdk/verisign_epp-extension_low-balance_v01.html //! <https://www.verisign.com/assets/epp-sdk/verisign_epp-extension_low-balance_v01.html>
use instant_xml::FromXml; use instant_xml::FromXml;

View File

@ -64,7 +64,7 @@ impl<'a> Extension for NameStore<'a> {
} }
#[derive(Debug, FromXml, ToXml)] #[derive(Debug, FromXml, ToXml)]
/// Type for EPP XML &lt;namestoreExt&gt; extension /// Type for EPP XML `<namestoreExt>` extension
#[xml(rename = "namestoreExt", ns(XMLNS))] #[xml(rename = "namestoreExt", ns(XMLNS))]
pub struct NameStore<'a> { pub struct NameStore<'a> {
/// The object holding the list of domains to be checked /// The object holding the list of domains to be checked

View File

@ -47,7 +47,7 @@ pub struct Update<T> {
pub data: T, pub data: T,
} }
/// Type corresponding to the &lt;report&gt; section in the EPP rgp restore extension /// Type corresponding to the `<report>` section in the EPP rgp restore extension
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "report", ns(XMLNS))] #[xml(rename = "report", ns(XMLNS))]
pub struct RgpRestoreReportSectionData<'a> { pub struct RgpRestoreReportSectionData<'a> {
@ -75,13 +75,13 @@ pub struct RgpRestoreReportSectionData<'a> {
} }
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
/// Type for EPP XML &lt;check&gt; command for domains /// Type for EPP XML `<check>` command for domains
#[xml(rename = "restore", ns(XMLNS))] #[xml(rename = "restore", ns(XMLNS))]
pub struct RgpRestoreReport<'a> { pub struct RgpRestoreReport<'a> {
/// The value of the op attribute for the &lt;restore&gt; tag /// The value of the op attribute for the `<restore>` tag
#[xml(attribute)] #[xml(attribute)]
op: &'a str, op: &'a str,
/// Data for the &lt;report&gt; tag /// Data for the `<report>` tag
#[xml(rename = "rgp:report")] #[xml(rename = "rgp:report")]
report: RgpRestoreReportSectionData<'a>, report: RgpRestoreReportSectionData<'a>,
} }

View File

@ -25,11 +25,11 @@ pub struct Update<T> {
pub data: T, pub data: T,
} }
/// Type corresponding to the &lt;restore&gt; tag for an rgp restore request /// Type corresponding to the `<restore>` tag for an rgp restore request
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "restore", ns(XMLNS))] #[xml(rename = "restore", ns(XMLNS))]
pub struct RgpRestoreRequest<'a> { pub struct RgpRestoreRequest<'a> {
/// The value of the op attribute in the &lt;restore&gt; tag /// The value of the op attribute in the `<restore>` tag
#[xml(attribute)] #[xml(attribute)]
pub op: &'a str, pub op: &'a str,
} }
@ -42,7 +42,7 @@ impl Default for RgpRestoreRequest<'static> {
// Response // Response
/// Type that represents the &lt;rgpStatus&gt; tag for domain rgp restore request response /// Type that represents the `<rgpStatus>` tag for domain rgp restore request response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "rgpStatus", ns(XMLNS))] #[xml(rename = "rgpStatus", ns(XMLNS))]
pub struct RgpStatus { pub struct RgpStatus {
@ -53,21 +53,21 @@ pub struct RgpStatus {
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "upData", ns(XMLNS))] #[xml(rename = "upData", ns(XMLNS))]
/// Type that represents the &lt;resData&gt; tag for domain transfer response /// Type that represents the `<resData>` tag for domain transfer response
pub struct RgpRequestUpdateResponse { pub struct RgpRequestUpdateResponse {
/// Data under the &lt;rgpStatus&gt; tag /// Data under the `<rgpStatus>` tag
pub rgp_status: Vec<RgpStatus>, pub rgp_status: Vec<RgpStatus>,
} }
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "infData", ns(XMLNS))] #[xml(rename = "infData", ns(XMLNS))]
/// Type that represents the &lt;resData&gt; tag for domain transfer response /// Type that represents the `<resData>` tag for domain transfer response
pub struct RgpRequestInfoResponse { pub struct RgpRequestInfoResponse {
/// Data under the &lt;rgpStatus&gt; tag /// Data under the `<rgpStatus>` tag
pub rgp_status: Vec<RgpStatus>, pub rgp_status: Vec<RgpStatus>,
} }
/// Type that represents the &lt;resData&gt; tag for domain transfer response /// Type that represents the `<resData>` tag for domain transfer response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(forward)] #[xml(forward)]
pub enum RgpRequestResponse { pub enum RgpRequestResponse {

View File

@ -13,7 +13,7 @@ pub(crate) struct Hello;
// Response // Response
/// Type for data within the <svcMenu> section of an EPP greeting /// Type for data within the `<svcMenu>` section of an EPP greeting
#[derive(Debug, Eq, PartialEq)] #[derive(Debug, Eq, PartialEq)]
pub struct ServiceMenu { pub struct ServiceMenu {
pub options: Options<'static>, pub options: Options<'static>,
@ -37,7 +37,7 @@ impl<'xml> FromXml<'xml> for ServiceMenu {
FlattenedServiceMenu::matches(id, field) FlattenedServiceMenu::matches(id, field)
} }
/// Deserializes the <svcMenu> data to the `ServiceMenu` type /// Deserializes the `<svcMenu>` data to the `ServiceMenu` type
fn deserialize<'cx>( fn deserialize<'cx>(
into: &mut Self::Accumulator, into: &mut Self::Accumulator,
field: &'static str, field: &'static str,
@ -70,51 +70,51 @@ impl<'xml> FromXml<'xml> for ServiceMenu {
const KIND: instant_xml::Kind = FlattenedServiceMenu::KIND; const KIND: instant_xml::Kind = FlattenedServiceMenu::KIND;
} }
/// Type corresponding to <all> in the EPP greeting XML /// Type corresponding to `<all>` in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "all", ns(EPP_XMLNS))] #[xml(rename = "all", ns(EPP_XMLNS))]
pub struct All; pub struct All;
/// Type corresponding to <none> in the EPP greeting XML /// Type corresponding to `<none>` in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "noAccess", ns(EPP_XMLNS))] #[xml(rename = "noAccess", ns(EPP_XMLNS))]
pub struct NoAccess; pub struct NoAccess;
/// Type corresponding to <null> in the EPP greeting XML /// Type corresponding to `<null>` in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "null", ns(EPP_XMLNS))] #[xml(rename = "null", ns(EPP_XMLNS))]
pub struct Null; pub struct Null;
/// Type corresponding to <personal> in the EPP greeting XML /// Type corresponding to `<personal>` in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "personal", ns(EPP_XMLNS))] #[xml(rename = "personal", ns(EPP_XMLNS))]
pub struct Personal; pub struct Personal;
/// Type corresponding to <personalAndOther> in the EPP greeting XML /// Type corresponding to `<personalAndOther>` in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "personalAndOther", ns(EPP_XMLNS))] #[xml(rename = "personalAndOther", ns(EPP_XMLNS))]
pub struct PersonalAndOther; pub struct PersonalAndOther;
/// Type corresponding to <other> in the EPP greeting XML /// Type corresponding to `<other>` in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "other", ns(EPP_XMLNS))] #[xml(rename = "other", ns(EPP_XMLNS))]
pub struct Other; pub struct Other;
/// Type corresponding to possible <retention> type values /// Type corresponding to possible `<retention>` type values
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(forward)] #[xml(forward)]
pub enum AccessType { pub enum AccessType {
/// Data for the <all> tag /// Data for the `<all>` tag
All(All), All(All),
/// Data for the <none> tag /// Data for the `<none>` tag
NoAccess(NoAccess), NoAccess(NoAccess),
/// Data for the <null> tag /// Data for the `<null>` tag
Null(Null), Null(Null),
/// Data for the <personal> tag /// Data for the `<personal>` tag
Personal(Personal), Personal(Personal),
/// Data for the <personalAndOther> tag /// Data for the `<personalAndOther>` tag
PersonalAndOther(PersonalAndOther), PersonalAndOther(PersonalAndOther),
/// Data for the <other> tag /// Data for the `<other>` tag
Other(Other), Other(Other),
} }
@ -124,17 +124,17 @@ pub struct Access {
inner: AccessType, inner: AccessType,
} }
/// Type corresponding to possible <purpose> type values /// Type corresponding to possible `<purpose>` type values
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(forward)] #[xml(forward)]
pub enum PurposeType { pub enum PurposeType {
/// Data for the <admin> tag /// Data for the `<admin>` tag
Admin(Admin), Admin(Admin),
/// Data for the <contact> tag /// Data for the `<contact>` tag
Contact(Contact), Contact(Contact),
/// Data for the <prov> tag /// Data for the `<prov>` tag
Prov(Prov), Prov(Prov),
/// Data for the <other> tag /// Data for the `<other>` tag
OtherPurpose(OtherPurpose), OtherPurpose(OtherPurpose),
} }
@ -154,26 +154,26 @@ pub struct Prov;
#[xml(rename = "otherPurpose", ns(EPP_XMLNS))] #[xml(rename = "otherPurpose", ns(EPP_XMLNS))]
pub struct OtherPurpose; pub struct OtherPurpose;
/// Type corresponding to <purpose> in the EPP greeting XML /// Type corresponding to `<purpose>` in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "purpose", ns(EPP_XMLNS))] #[xml(rename = "purpose", ns(EPP_XMLNS))]
pub struct Purpose { pub struct Purpose {
pub purpose: Vec<PurposeType>, pub purpose: Vec<PurposeType>,
} }
/// Type corresponding to possible <purpose> type values /// Type corresponding to possible `<purpose>` type values
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(forward)] #[xml(forward)]
pub enum RecipientType { pub enum RecipientType {
/// Data for the <other> tag /// Data for the `<other>` tag
Other(Other), Other(Other),
/// Data for the <ours> tag /// Data for the `<ours>` tag
Ours(Ours), Ours(Ours),
/// Data for the <public> tag /// Data for the `<public>` tag
Public(Public), Public(Public),
/// Data for the <same> tag /// Data for the `<same>` tag
Same(Same), Same(Same),
/// Data for the <unrelated> tag /// Data for the `<unrelated>` tag
Unrelated(Unrelated), Unrelated(Unrelated),
} }
@ -193,51 +193,51 @@ pub struct Unrelated;
#[xml(rename = "same", ns(EPP_XMLNS))] #[xml(rename = "same", ns(EPP_XMLNS))]
pub struct Same; pub struct Same;
/// Type corresponding to <recipeint> in the EPP greeting XML /// Type corresponding to `<recipeint>` in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "recipient", ns(EPP_XMLNS))] #[xml(rename = "recipient", ns(EPP_XMLNS))]
pub struct Recipient { pub struct Recipient {
pub recipient: Vec<RecipientType>, pub recipient: Vec<RecipientType>,
} }
/// Type corresponding to <business> in the EPP greeting XML /// Type corresponding to `<business>` in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "business", ns(EPP_XMLNS))] #[xml(rename = "business", ns(EPP_XMLNS))]
pub struct Business; pub struct Business;
/// Type corresponding to <indefinite> in the EPP greeting XML /// Type corresponding to `<indefinite>` in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "indefinite", ns(EPP_XMLNS))] #[xml(rename = "indefinite", ns(EPP_XMLNS))]
pub struct Indefinite; pub struct Indefinite;
/// Type corresponding to <legal> in the EPP greeting XML /// Type corresponding to `<legal>` in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "legal", ns(EPP_XMLNS))] #[xml(rename = "legal", ns(EPP_XMLNS))]
pub struct Legal; pub struct Legal;
/// Type corresponding to <none> in the EPP greeting XML /// Type corresponding to `<none>` in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "none", ns(EPP_XMLNS))] #[xml(rename = "none", ns(EPP_XMLNS))]
pub struct No; pub struct No;
/// Type corresponding to <stated> in the EPP greeting XML /// Type corresponding to `<stated>` in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "stated", ns(EPP_XMLNS))] #[xml(rename = "stated", ns(EPP_XMLNS))]
pub struct Stated; pub struct Stated;
/// Type corresponding to possible <retention> type values /// Type corresponding to possible `<retention>` type values
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(forward, rename = "retention", ns(EPP_XMLNS))] #[xml(forward, rename = "retention", ns(EPP_XMLNS))]
pub enum RetentionType { pub enum RetentionType {
/// Data for the <business> tag /// Data for the `<business>` tag
Business(Business), Business(Business),
/// Data for the <indefinite> tag /// Data for the `<indefinite>` tag
Indefinite(Indefinite), Indefinite(Indefinite),
/// Data for the <legal> tag /// Data for the `<legal>` tag
Legal(Legal), Legal(Legal),
/// Data for the <none> tag /// Data for the `<none>` tag
None(No), None(No),
/// Data for the <stated> tag /// Data for the `<stated>` tag
Stated(Stated), Stated(Stated),
} }
@ -247,58 +247,58 @@ pub struct Retention {
inner: RetentionType, inner: RetentionType,
} }
/// Type corresponding to <statement> in the EPP greeting XML (pending more compliant implementation) /// Type corresponding to `<statement>` in the EPP greeting XML (pending more compliant implementation)
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "statement", ns(EPP_XMLNS))] #[xml(rename = "statement", ns(EPP_XMLNS))]
pub struct Statement { pub struct Statement {
/// Data for the <purpose> tag /// Data for the `<purpose>` tag
pub purpose: Purpose, pub purpose: Purpose,
/// Data for the <recipient> tag /// Data for the `<recipient>` tag
pub recipient: Recipient, pub recipient: Recipient,
/// Data for the <retention> tag /// Data for the `<retention>` tag
pub retention: Retention, pub retention: Retention,
} }
/// Type corresponding to <absolute> value in the EPP greeting XML /// Type corresponding to `<absolute>` value in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "absolute", ns(EPP_XMLNS))] #[xml(rename = "absolute", ns(EPP_XMLNS))]
pub struct Absolute(String); pub struct Absolute(String);
/// Type corresponding to <relative> value in the EPP greeting XML /// Type corresponding to `<relative>` value in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "relative", ns(EPP_XMLNS))] #[xml(rename = "relative", ns(EPP_XMLNS))]
pub struct Relative(String); pub struct Relative(String);
/// Type corresponding to possible <expiry> type values /// Type corresponding to possible `<expiry>` type values
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(forward)] #[xml(forward)]
pub enum ExpiryType { pub enum ExpiryType {
/// Data for the <absolute> tag /// Data for the `<absolute>` tag
Absolute(Absolute), Absolute(Absolute),
/// Data for the <relative> tag /// Data for the `<relative>` tag
Relative(Relative), Relative(Relative),
} }
/// Type corresponding to possible <expiry> type values /// Type corresponding to possible `<expiry>` type values
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "expiry", ns(EPP_XMLNS))] #[xml(rename = "expiry", ns(EPP_XMLNS))]
pub struct Expiry { pub struct Expiry {
inner: ExpiryType, inner: ExpiryType,
} }
/// Type corresponding to <dcp> in the EPP greeting XML /// Type corresponding to `<dcp>` in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "dcp", ns(EPP_XMLNS))] #[xml(rename = "dcp", ns(EPP_XMLNS))]
pub struct Dcp { pub struct Dcp {
/// Data for the <access> tag /// Data for the `<access>` tag
pub access: Access, pub access: Access,
/// Data for the <statement> tags /// Data for the `<statement>` tags
pub statement: Vec<Statement>, pub statement: Vec<Statement>,
/// Data for the <expiry> tag /// Data for the `<expiry>` tag
pub expiry: Option<Expiry>, pub expiry: Option<Expiry>,
} }
/// Type corresponding to the <greeting> tag in the EPP greeting XML /// Type corresponding to the `<greeting>` tag in the EPP greeting XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(ns(EPP_XMLNS), rename = "greeting", rename_all = "lowercase")] #[xml(ns(EPP_XMLNS), rename = "greeting", rename_all = "lowercase")]
pub struct Greeting { pub struct Greeting {
@ -308,9 +308,9 @@ pub struct Greeting {
/// The date from the EPP server /// The date from the EPP server
#[xml(rename = "svDate")] #[xml(rename = "svDate")]
pub service_date: DateTime<Utc>, pub service_date: DateTime<Utc>,
/// Data under the <svcMenu> element /// Data under the `<svcMenu>` element
pub svc_menu: ServiceMenu, pub svc_menu: ServiceMenu,
/// Data under the <dcp> element /// Data under the `<dcp>` element
pub dcp: Dcp, pub dcp: Dcp,
} }

View File

@ -17,7 +17,7 @@ impl<'a> Command for HostCheck<'a> {
// Request // Request
/// Type for data under the host &lt;check&gt; tag /// Type for data under the host `<check>` tag
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "check", ns(XMLNS))] #[xml(rename = "check", ns(XMLNS))]
struct HostCheckData<'a> { struct HostCheckData<'a> {
@ -57,12 +57,12 @@ pub struct Checked {
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "cd", ns(XMLNS))] #[xml(rename = "cd", ns(XMLNS))]
pub struct CheckedHost { pub struct CheckedHost {
/// Data under the &lt;cd&gt; tag /// Data under the `<cd>` tag
#[xml(rename = "cd")] #[xml(rename = "cd")]
pub inner: Checked, pub inner: Checked,
} }
/// Type that represents the &lt;chkData&gt; tag for host check response /// Type that represents the `<chkData>` tag for host check response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "chkData", ns(XMLNS))] #[xml(rename = "chkData", ns(XMLNS))]
pub struct CheckData { pub struct CheckData {

View File

@ -26,7 +26,7 @@ impl<'a> HostCreate<'a> {
// Request // Request
/// Type for data under the host &lt;create&gt; tag /// Type for data under the host `<create>` tag
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "create", ns(XMLNS))] #[xml(rename = "create", ns(XMLNS))]
pub struct HostCreateRequest<'a> { pub struct HostCreateRequest<'a> {
@ -37,7 +37,7 @@ pub struct HostCreateRequest<'a> {
pub addresses: Option<&'a [IpAddr]>, pub addresses: Option<&'a [IpAddr]>,
} }
/// Type for EPP XML &lt;create&gt; command for hosts /// Type for EPP XML `<create>` command for hosts
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "create", ns(EPP_XMLNS))] #[xml(rename = "create", ns(EPP_XMLNS))]
pub struct HostCreate<'a> { pub struct HostCreate<'a> {
@ -47,7 +47,7 @@ pub struct HostCreate<'a> {
// Response // Response
/// Type that represents the &lt;creData&gt; tag for host create response /// Type that represents the `<creData>` tag for host create response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "creData", ns(XMLNS))] #[xml(rename = "creData", ns(XMLNS))]
pub struct CreateData { pub struct CreateData {

View File

@ -21,7 +21,7 @@ impl<'a> HostDelete<'a> {
} }
} }
/// Type for data under the host &lt;delete&gt; tag /// Type for data under the host `<delete>` tag
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "delete", ns(XMLNS))] #[xml(rename = "delete", ns(XMLNS))]
pub struct HostDeleteRequest<'a> { pub struct HostDeleteRequest<'a> {
@ -29,7 +29,7 @@ pub struct HostDeleteRequest<'a> {
name: &'a str, name: &'a str,
} }
/// Type for EPP XML &lt;delete&gt; command for hosts /// Type for EPP XML `<delete>` command for hosts
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "delete", ns(EPP_XMLNS))] #[xml(rename = "delete", ns(EPP_XMLNS))]
pub struct HostDelete<'a> { pub struct HostDelete<'a> {

View File

@ -27,7 +27,7 @@ impl<'a> HostInfo<'a> {
// Request // Request
/// Type for data under the host &lt;info&gt; tag /// Type for data under the host `<info>` tag
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "info", ns(XMLNS))] #[xml(rename = "info", ns(XMLNS))]
pub struct HostInfoRequestData<'a> { pub struct HostInfoRequestData<'a> {
@ -35,7 +35,7 @@ pub struct HostInfoRequestData<'a> {
name: &'a str, name: &'a str,
} }
/// Type for EPP XML &lt;info&gt; command for hosts /// Type for EPP XML `<info>` command for hosts
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "info", ns(EPP_XMLNS))] #[xml(rename = "info", ns(EPP_XMLNS))]
pub struct HostInfo<'a> { pub struct HostInfo<'a> {
@ -46,7 +46,7 @@ pub struct HostInfo<'a> {
// Response // Response
/// Type that represents the &lt;infData&gt; tag for host info response /// Type that represents the `<infData>` tag for host info response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "infData", ns(XMLNS))] #[xml(rename = "infData", ns(XMLNS))]
pub struct InfoData { pub struct InfoData {
@ -104,11 +104,11 @@ fn deserialize_host_addrs(
} }
/* /*
/// Type that represents the &lt;resData&gt; tag for host info response /// Type that represents the `<resData>` tag for host info response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(rename = "infData", ns(XMLNS))] #[xml(rename = "infData", ns(XMLNS))]
pub struct HostInfoResponse { pub struct HostInfoResponse {
/// Data under the &lt;infData&gt; tag /// Data under the `<infData>` tag
#[xml(rename = "infData")] #[xml(rename = "infData")]
pub info_data: HostInfoResponseData, pub info_data: HostInfoResponseData,
} }

View File

@ -25,16 +25,16 @@ pub use update::HostUpdate;
pub const XMLNS: &str = "urn:ietf:params:xml:ns:host-1.0"; pub const XMLNS: &str = "urn:ietf:params:xml:ns:host-1.0";
/// The &lt;status&gt; type on contact transactions /// The `<status>` type on contact transactions
#[derive(Debug, FromXml, ToXml)] #[derive(Debug, FromXml, ToXml)]
#[xml(rename = "status", ns(XMLNS))] #[xml(rename = "status", ns(XMLNS))]
pub struct Status<'a> { pub struct Status<'a> {
/// The status name, represented by the 's' attr on &lt;status&gt; tags /// The status name, represented by the 's' attr on `<status>` tags
#[xml(attribute, rename = "s")] #[xml(attribute, rename = "s")]
pub status: Cow<'a, str>, pub status: Cow<'a, str>,
} }
/// The &lt;hostAddr&gt; types domain or host transactions /// The `<hostAddr>` types domain or host transactions
#[derive(Debug, FromXml, ToXml)] #[derive(Debug, FromXml, ToXml)]
#[xml(rename = "addr", ns(XMLNS))] #[xml(rename = "addr", ns(XMLNS))]
pub(crate) struct HostAddr<'a> { pub(crate) struct HostAddr<'a> {

View File

@ -27,23 +27,23 @@ impl<'a> HostUpdate<'a> {
} }
} }
/// Sets the data for the &lt;chg&gt; element of the host update /// Sets the data for the `<chg>` element of the host update
pub fn info(&mut self, info: HostChangeInfo<'a>) { pub fn info(&mut self, info: HostChangeInfo<'a>) {
self.host.change_info = Some(info); self.host.change_info = Some(info);
} }
/// Sets the data for the &lt;add&gt; element of the host update /// Sets the data for the `<add>` element of the host update
pub fn add(&mut self, add: HostAdd<'a>) { pub fn add(&mut self, add: HostAdd<'a>) {
self.host.add = Some(add); self.host.add = Some(add);
} }
/// Sets the data for the &lt;rem&gt; element of the host update /// Sets the data for the `<rem>` element of the host update
pub fn remove(&mut self, remove: HostRemove<'a>) { pub fn remove(&mut self, remove: HostRemove<'a>) {
self.host.remove = Some(remove); self.host.remove = Some(remove);
} }
} }
/// Type for data under the &lt;chg&gt; tag /// Type for data under the `<chg>` tag
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "chg", ns(XMLNS))] #[xml(rename = "chg", ns(XMLNS))]
pub struct HostChangeInfo<'a> { pub struct HostChangeInfo<'a> {
@ -51,7 +51,7 @@ pub struct HostChangeInfo<'a> {
pub name: &'a str, pub name: &'a str,
} }
/// Type for data under the &lt;add&gt; and &lt;rem&gt; tags /// Type for data under the `<add>` and `<rem>` tags
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "add", ns(XMLNS))] #[xml(rename = "add", ns(XMLNS))]
pub struct HostAdd<'a> { pub struct HostAdd<'a> {
@ -63,7 +63,7 @@ pub struct HostAdd<'a> {
pub statuses: Option<&'a [Status<'a>]>, pub statuses: Option<&'a [Status<'a>]>,
} }
/// Type for data under the &lt;add&gt; and &lt;rem&gt; tags /// Type for data under the `<add>` and `<rem>` tags
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "rem", ns(XMLNS))] #[xml(rename = "rem", ns(XMLNS))]
pub struct HostRemove<'a> { pub struct HostRemove<'a> {
@ -75,7 +75,7 @@ pub struct HostRemove<'a> {
pub statuses: Option<&'a [Status<'a>]>, pub statuses: Option<&'a [Status<'a>]>,
} }
/// Type for data under the host &lt;update&gt; tag /// Type for data under the host `<update>` tag
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "update", ns(XMLNS))] #[xml(rename = "update", ns(XMLNS))]
pub struct HostUpdateRequest<'a> { pub struct HostUpdateRequest<'a> {
@ -92,7 +92,7 @@ pub struct HostUpdateRequest<'a> {
change_info: Option<HostChangeInfo<'a>>, change_info: Option<HostChangeInfo<'a>>,
} }
/// Type for EPP XML &lt;update&gt; command for hosts /// Type for EPP XML `<update>` command for hosts
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "update", ns(EPP_XMLNS))] #[xml(rename = "update", ns(EPP_XMLNS))]
pub struct HostUpdate<'a> { pub struct HostUpdate<'a> {

View File

@ -10,7 +10,7 @@ use crate::{
impl<'a> Transaction<NoExtension> for Login<'a> {} impl<'a> Transaction<NoExtension> for Login<'a> {}
/// Type corresponding to the &lt;login&gt; tag in an EPP XML login request /// Type corresponding to the `<login>` tag in an EPP XML login request
#[derive(Debug, Eq, PartialEq, ToXml)] #[derive(Debug, Eq, PartialEq, ToXml)]
#[xml(rename = "login", ns(EPP_XMLNS))] #[xml(rename = "login", ns(EPP_XMLNS))]
pub struct Login<'a> { pub struct Login<'a> {
@ -23,9 +23,9 @@ pub struct Login<'a> {
/// A new password which should be set /// A new password which should be set
#[xml(rename = "newPW")] #[xml(rename = "newPW")]
new_password: Option<&'a str>, new_password: Option<&'a str>,
/// Data under the <options> tag /// Data under the `<options>` tag
options: Options<'a>, options: Options<'a>,
/// Data under the <svcs> tag /// Data under the `<svcs>` tag
#[xml(rename = "svcs")] #[xml(rename = "svcs")]
services: Services<'a>, services: Services<'a>,
} }
@ -58,12 +58,12 @@ impl<'a> Login<'a> {
} }
} }
/// Sets the <options> tag data /// Sets the `<options>` tag data
pub fn options(&mut self, options: Options<'a>) { pub fn options(&mut self, options: Options<'a>) {
self.options = options; self.options = options;
} }
/// Sets the <svcs> tag data /// Sets the `<svcs>` tag data
pub fn services(&mut self, services: Services<'a>) { pub fn services(&mut self, services: Services<'a>) {
self.services = services; self.services = services;
} }

View File

@ -15,7 +15,7 @@ impl Command for Logout {
} }
#[derive(Debug, Eq, FromXml, PartialEq, ToXml)] #[derive(Debug, Eq, FromXml, PartialEq, ToXml)]
/// Type corresponding to the &lt;logout&gt; tag in an EPP XML logout request /// Type corresponding to the `<logout>` tag in an EPP XML logout request
#[xml(rename = "logout", ns(EPP_XMLNS))] #[xml(rename = "logout", ns(EPP_XMLNS))]
pub struct Logout; pub struct Logout;

View File

@ -13,7 +13,7 @@ impl<'a> Command for MessageAck<'a> {
} }
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
/// Type for EPP XML &lt;poll&gt; command for message ack /// Type for EPP XML `<poll>` command for message ack
#[xml(rename = "poll", ns(EPP_XMLNS))] #[xml(rename = "poll", ns(EPP_XMLNS))]
pub struct MessageAck<'a> { pub struct MessageAck<'a> {
/// The type of operation to perform /// The type of operation to perform

View File

@ -16,7 +16,7 @@ impl<'a> Command for MessagePoll<'a> {
// Request // Request
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
/// Type for EPP XML &lt;poll&gt; command for message poll /// Type for EPP XML `<poll>` command for message poll
#[xml(rename = "poll", ns(EPP_XMLNS))] #[xml(rename = "poll", ns(EPP_XMLNS))]
pub struct MessagePoll<'a> { pub struct MessagePoll<'a> {
/// The type of operation to perform /// The type of operation to perform
@ -33,15 +33,15 @@ impl Default for MessagePoll<'static> {
// Response // Response
/// Type that represents the &lt;trnData&gt; tag for message poll response /// Type that represents the `<trnData>` tag for message poll response
#[derive(Debug, FromXml)] #[derive(Debug, FromXml)]
#[xml(forward)] #[xml(forward)]
pub enum MessagePollResponse { pub enum MessagePollResponse {
/// Data under the &lt;domain:trnData&gt; tag /// Data under the `<domain:trnData>` tag
DomainTransfer(TransferData), DomainTransfer(TransferData),
/// Data under the &lt;host:infData&gt; tag /// Data under the `<host:infData>` tag
HostInfo(InfoData), HostInfo(InfoData),
/// Data under the &lt;lowbalance&gt; tag /// Data under the `<lowbalance>` tag
LowBalance(LowBalance), LowBalance(LowBalance),
} }

View File

@ -22,11 +22,11 @@ pub trait Extension: ToXml + Debug {
} }
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
/// Type corresponding to the &lt;command&gt; tag in an EPP XML request /// Type corresponding to the `<command>` tag in an EPP XML request
/// with an &lt;extension&gt; tag /// with an `<extension>` tag
pub(crate) struct CommandWrapper<'a, D, E> { pub(crate) struct CommandWrapper<'a, D, E> {
pub command: &'static str, pub command: &'static str,
/// The instance that will be used to populate the &lt;command&gt; tag /// The instance that will be used to populate the `<command>` tag
pub data: &'a D, pub data: &'a D,
/// The client TRID /// The client TRID
pub extension: Option<&'a E>, pub extension: Option<&'a E>,

View File

@ -7,30 +7,30 @@ use instant_xml::{FromXml, Kind};
use crate::common::EPP_XMLNS; use crate::common::EPP_XMLNS;
/// Type corresponding to the <undef> tag an EPP response XML /// Type corresponding to the `<undef>` tag an EPP response XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "undef", ns(EPP_XMLNS))] #[xml(rename = "undef", ns(EPP_XMLNS))]
pub struct Undef; pub struct Undef;
/// Type corresponding to the <value> tag under <extValue> in an EPP response XML /// Type corresponding to the `<value>` tag under `<extValue>` in an EPP response XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "value", ns(EPP_XMLNS))] #[xml(rename = "value", ns(EPP_XMLNS))]
pub struct ResultValue { pub struct ResultValue {
/// The <undef> element /// The `<undef>` element
pub undef: Undef, pub undef: Undef,
} }
/// Type corresponding to the <extValue> tag in an EPP response XML /// Type corresponding to the `<extValue>` tag in an EPP response XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "extValue", ns(EPP_XMLNS))] #[xml(rename = "extValue", ns(EPP_XMLNS))]
pub struct ExtValue { pub struct ExtValue {
/// Data under the <value> tag /// Data under the `<value>` tag
pub value: ResultValue, pub value: ResultValue,
/// Data under the <reason> tag /// Data under the `<reason>` tag
pub reason: String, pub reason: String,
} }
/// Type corresponding to the <result> tag in an EPP response XML /// Type corresponding to the `<result>` tag in an EPP response XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "result", ns(EPP_XMLNS))] #[xml(rename = "result", ns(EPP_XMLNS))]
pub struct EppResult { pub struct EppResult {
@ -40,7 +40,7 @@ pub struct EppResult {
/// The result message /// The result message
#[xml(rename = "msg")] #[xml(rename = "msg")]
pub message: String, pub message: String,
/// Data under the <extValue> tag /// Data under the `<extValue>` tag
pub ext_value: Option<ExtValue>, pub ext_value: Option<ExtValue>,
} }
@ -190,7 +190,7 @@ impl<'de> serde::de::Visitor<'de> for ResultCodeVisitor {
} }
} }
/// Type corresponding to the <trID> tag in an EPP response XML /// Type corresponding to the `<trID>` tag in an EPP response XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "trID", ns(EPP_XMLNS))] #[xml(rename = "trID", ns(EPP_XMLNS))]
pub struct ResponseTRID { pub struct ResponseTRID {
@ -202,7 +202,7 @@ pub struct ResponseTRID {
pub server_tr_id: String, pub server_tr_id: String,
} }
/// Type corresponding to the <msgQ> tag in an EPP response XML /// Type corresponding to the `<msgQ>` tag in an EPP response XML
#[derive(Debug, Eq, FromXml, PartialEq)] #[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "msgQ", ns(EPP_XMLNS))] #[xml(rename = "msgQ", ns(EPP_XMLNS))]
pub struct MessageQueue { pub struct MessageQueue {
@ -230,20 +230,20 @@ pub struct Message {
} }
#[derive(Debug, FromXml, PartialEq)] #[derive(Debug, FromXml, PartialEq)]
/// Type corresponding to the &lt;response&gt; tag in an EPP response XML /// Type corresponding to the `<response>` tag in an EPP response XML
/// containing an &lt;extension&gt; tag /// containing an `<extension>` tag
#[xml(rename = "response", ns(EPP_XMLNS))] #[xml(rename = "response", ns(EPP_XMLNS))]
pub struct Response<D, E> { pub struct Response<D, E> {
/// Data under the <result> tag /// Data under the `<result>` tag
pub result: EppResult, pub result: EppResult,
/// Data under the <msgQ> tag /// Data under the `<msgQ>` tag
#[xml(rename = "msgQ")] #[xml(rename = "msgQ")]
pub message_queue: Option<MessageQueue>, pub message_queue: Option<MessageQueue>,
/// Data under the &lt;resData&gt; tag /// Data under the `<resData>` tag
pub res_data: Option<ResponseData<D>>, pub res_data: Option<ResponseData<D>>,
/// Data under the &lt;extension&gt; tag /// Data under the `<extension>` tag
pub extension: Option<Extension<E>>, pub extension: Option<Extension<E>>,
/// Data under the <trID> tag /// Data under the `<trID>` tag
pub tr_ids: ResponseTRID, pub tr_ids: ResponseTRID,
} }
@ -260,19 +260,19 @@ impl<D> ResponseData<D> {
} }
#[derive(Debug, FromXml, PartialEq)] #[derive(Debug, FromXml, PartialEq)]
/// Type corresponding to the &lt;response&gt; tag in an EPP response XML /// Type corresponding to the `<response>` tag in an EPP response XML
/// without <msgQ> or &lt;resData&gt; sections. Generally used for error handling /// without `<msgQ>` or `<resData>` sections. Generally used for error handling
#[xml(rename = "response", ns(EPP_XMLNS))] #[xml(rename = "response", ns(EPP_XMLNS))]
pub struct ResponseStatus { pub struct ResponseStatus {
/// Data under the <result> tag /// Data under the `<result>` tag
pub result: EppResult, pub result: EppResult,
#[xml(rename = "trID")] #[xml(rename = "trID")]
/// Data under the <trID> tag /// Data under the `<trID>` tag
pub tr_ids: ResponseTRID, pub tr_ids: ResponseTRID,
} }
impl<T, E> Response<T, E> { impl<T, E> Response<T, E> {
/// Returns the data under the corresponding &lt;resData&gt; from the EPP XML /// Returns the data under the corresponding `<resData>` from the EPP XML
pub fn res_data(&self) -> Option<&T> { pub fn res_data(&self) -> Option<&T> {
match &self.res_data { match &self.res_data {
Some(res_data) => Some(&res_data.data), Some(res_data) => Some(&res_data.data),
@ -287,7 +287,7 @@ impl<T, E> Response<T, E> {
} }
} }
/// Returns the data under the corresponding <msgQ> from the EPP XML /// Returns the data under the corresponding `<msgQ>` from the EPP XML
pub fn message_queue(&self) -> Option<&MessageQueue> { pub fn message_queue(&self) -> Option<&MessageQueue> {
match &self.message_queue { match &self.message_queue {
Some(queue) => Some(queue), Some(queue) => Some(queue),