fixed comments for rustdoc

This commit is contained in:
Ritesh Chitlangi 2021-07-27 03:27:18 +08:00
parent 402b0da353
commit 1b4cf39c69
45 changed files with 295 additions and 285 deletions

View File

@ -1,9 +1,9 @@
//! Macros for the EPP Client Library for the Extensible Provisioning Protocol (EPP).
//! # Macros for the epp-client Library.
//!
//! ## Description
//!
//! epp-client is a client library for Internet domain registration and management for domain registrars.
//! This macro crate contains a fe macros to simplify serialization of generic types used in some places
//! `epp-client` is a client library for Internet domain registration and management for domain registrars.
//! This macro crate contains a few macros to simplify serialization of generic types used in some places
//! in the `epp-client` library
//!

View File

@ -79,7 +79,7 @@ async fn connect(registry: &'static str) -> Result<EppClient, Box<dyn Error>> {
Ok(client)
}
/// Instances of the EppClient type are used to transact with the registry
/// Instances of the EppClient type are used to transact with the registry.
/// Once initialized, the EppClient instance can serialize EPP requests to XML and send them
/// to the registry and deserialize the XML responses from the registry to local types
pub struct EppClient {
@ -133,7 +133,7 @@ impl EppClient {
Ok(client)
}
/// Executes an EPP Hello call and return the response as an `EppGreeting`
/// Executes an EPP Hello call and returns the response as an `EppGreeting`
pub async fn hello(&mut self) -> Result<EppGreeting, Box<dyn Error>> {
let hello = EppHello::new();
let hello_xml = hello.serialize()?;
@ -162,7 +162,7 @@ impl EppClient {
}
/// Accepts raw EPP XML and returns the raw EPP XML response to it.
/// Not recommended to use directly but sometimes can be useful for debugging
/// Not recommended for direct use but sometimes can be useful for debugging
pub async fn transact_xml(&mut self, xml: &str) -> Result<String, Box<dyn Error>> {
self.connection.transact(&xml).await
}
@ -172,7 +172,7 @@ impl EppClient {
return String::from(&self.connection.greeting)
}
/// Returns the greeting received on establishment of the connection as an `EppGreeting` instance
/// Returns the greeting received on establishment of the connection as an `EppGreeting`
pub fn greeting(&self) -> Result<EppGreeting, error::Error> {
EppGreeting::deserialize(&self.connection.greeting)
}

View File

@ -51,12 +51,12 @@ pub trait ElementName {
#[derive(Deserialize, Debug, PartialEq)]
#[serde(rename = "epp")]
pub struct EppObject<T: ElementName> {
/// XML namespace for the <epp> tag
/// XML namespace for the &lt;epp&gt; tag
pub xmlns: String,
/// Schema namespace for the <epp> tag
/// Schema namespace for the &lt;epp&gt; tag
#[serde(rename = "xmlns:xsi")]
pub xmlns_xsi: String,
/// Schema location attribute for <epp>
/// Schema location attribute for &lt;epp&gt;
#[serde(rename = "xsi:schemaLocation")]
pub xsi_schema_location: String,
/// the request or response object that is set or received in the EPP XML document
@ -123,7 +123,7 @@ pub struct Services {
}
impl<T: ElementName> EppObject<T> {
/// Create the enclosing EPP XML tag <epp> for data that represents an EPP XML request or response
/// Create the enclosing EPP XML tag &lt;epp&gt; for data that represents an EPP XML request or response
pub fn build(data: T) -> EppObject<T> {
EppObject {
// xml: None,

View File

@ -3,12 +3,12 @@
use crate::epp::object::{StringValue, StringValueTrait};
use serde::{Deserialize, Serialize};
/// The <status> attribute on EPP XML for domain transactions
/// The &lt;status&gt; attribute on EPP XML for domain transactions
pub type DomainStatus = ContactStatus;
/// The <status> attribute on EPP XML for host transactions
/// The &lt;status&gt; attribute on EPP XML for host transactions
pub type HostStatus = ContactStatus;
/// The <hostAddr> types domain or host transactions
/// The &lt;hostAddr&gt; types domain or host transactions
#[derive(Serialize, Deserialize, Debug)]
pub struct HostAddr {
#[serde(rename = "ip")]
@ -43,44 +43,44 @@ impl HostAddr {
}
}
/// The <host> type for host transactions
/// The &lt;host&gt; type for host transactions
#[derive(Serialize, Deserialize, Debug)]
pub struct Host {
/// The <hostName> tag
/// The &lt;hostName&gt; tag
pub name: StringValue,
/// The <hostAddr> tags
/// The &lt;hostAddr&gt; tags
#[serde(rename = "addr")]
pub addresses: Option<Vec<HostAddr>>,
}
/// The <hostAttr> type for domain transactions
/// The &lt;hostAttr&gt; type for domain transactions
#[derive(Serialize, Deserialize, Debug)]
pub struct HostAttr {
/// The <hostName> tag
/// The &lt;hostName&gt; tag
#[serde(rename = "hostName")]
pub name: StringValue,
/// The <hostAddr> tags
/// The &lt;hostAddr&gt; tags
#[serde(rename = "hostAddr")]
pub addresses: Option<Vec<HostAddr>>,
}
/// The list of <hostAttr> types for domain transactions. Typically under an <ns> tag
/// The list of &lt;hostAttr&gt; types for domain transactions. Typically under an &lt;ns&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct HostAttrList {
/// The list of <hostAttr> tags
/// The list of &lt;hostAttr&gt; tags
#[serde(rename = "hostAttr")]
pub hosts: Vec<HostAttr>,
}
/// The list of <hostObj> types for domain transactions. Typically under an <ns> tag
/// The list of &lt;hostObj&gt; types for domain transactions. Typically under an &lt;ns&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct HostObjList {
/// The list of <hostObj> tags
/// The list of &lt;hostObj&gt; tags
#[serde(rename = "hostObj")]
pub hosts: Vec<StringValue>,
}
/// The <contact> type on domain creation and update requests
/// The &lt;contact&gt; type on domain creation and update requests
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainContact {
/// The contact id
@ -91,7 +91,7 @@ pub struct DomainContact {
pub contact_type: String,
}
/// The <period> type for registration, renewal or transfer on domain transactions
/// The &lt;period&gt; type for registration, renewal or transfer on domain transactions
#[derive(Serialize, Deserialize, Debug)]
pub struct Period {
/// The interval (usually 'y' indicating years)
@ -116,63 +116,63 @@ impl Period {
}
}
/// The <status> type on contact transactions
/// The &lt;status&gt; type on contact transactions
#[derive(Serialize, Deserialize, Debug)]
pub struct ContactStatus {
/// The status name, represented by the 's' attr on <status> tags
/// The status name, represented by the 's' attr on &lt;status&gt; tags
#[serde(rename = "s")]
pub status: String,
}
/// The data for <voice> and <fax> types on domain transactions
/// The data for &lt;voice&gt; and &lt;fax&gt; types on domain transactions
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Phone {
/// The inner text on the <voice> and <fax> tags
/// The inner text on the &lt;voice&gt; and &lt;fax&gt; tags
#[serde(rename = "$value")]
pub number: String,
/// The value of the 'x' attr on <voice> and <fax> tags
/// The value of the 'x' attr on &lt;voice&gt; and &lt;fax&gt; tags
#[serde(rename = "x")]
pub extension: Option<String>,
}
/// The <addr> type on contact transactions
/// The &lt;addr&gt; type on contact transactions
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Address {
/// The <street> tags under <addr>
/// The &lt;street&gt; tags under &lt;addr&gt;
pub street: Vec<StringValue>,
/// The <city> tag under <addr>
/// The &lt;city&gt; tag under &lt;addr&gt;
pub city: StringValue,
/// The <sp> tag under <addr>
/// The &lt;sp&gt; tag under &lt;addr&gt;
#[serde(rename = "sp")]
pub province: StringValue,
/// The <pc> tag under <addr>
/// The &lt;pc&gt; tag under &lt;addr&gt;
#[serde(rename = "pc")]
pub postal_code: StringValue,
/// The <cc> tag under <addr>
/// The &lt;cc&gt; tag under &lt;addr&gt;
#[serde(rename = "cc")]
pub country_code: StringValue,
}
/// The <postalInfo> type on contact transactions
/// The &lt;postalInfo&gt; type on contact transactions
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct PostalInfo {
/// The 'type' attr on <postalInfo>
/// The 'type' attr on &lt;postalInfo&gt;
#[serde(rename = "type")]
pub info_type: String,
/// The <name> tag under <postalInfo>
/// The &lt;name&gt; tag under &lt;postalInfo&gt;
pub name: StringValue,
/// The <org> tag under <postalInfo>
/// The &lt;org&gt; tag under &lt;postalInfo&gt;
#[serde(rename = "org")]
pub organization: StringValue,
/// The <addr> tag under <postalInfo>
/// The &lt;addr&gt; tag under &lt;postalInfo&gt;
#[serde(rename = "addr")]
pub address: Address,
}
/// The <authInfo> tag for domain and contact transactions
/// The &lt;authInfo&gt; tag for domain and contact transactions
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct AuthInfo {
/// The <pw> tag under <authInfo>
/// The &lt;pw&gt; tag under &lt;authInfo&gt;
#[serde(rename = "pw")]
pub password: StringValue,
}

View File

@ -24,9 +24,9 @@ pub type EppLogout = EppObject<Command<Logout>>;
#[derive(Deserialize, Debug, PartialEq, ElementName)]
#[element_name(name = "command")]
/// Type corresponding to the <command> tag in an EPP XML request
/// Type corresponding to the &lt;command&gt; tag in an EPP XML request
pub struct Command<T: ElementName> {
/// The instance that will be used to populate the <command> tag
/// The instance that will be used to populate the &lt;command&gt; tag
pub command: T,
/// The client TRID
#[serde(rename = "clTRID")]
@ -67,7 +67,7 @@ impl EppHello {
#[derive(Serialize, Deserialize, Debug, PartialEq, ElementName)]
#[element_name(name = "login")]
/// Type corresponding to the <login> tag in an EPP XML login request
/// Type corresponding to the &lt;login&gt; tag in an EPP XML login request
pub struct Login {
/// The username to use for the login
#[serde(rename(serialize = "clID", deserialize = "clID"))]
@ -135,7 +135,7 @@ impl EppLogin {
#[derive(Serialize, Deserialize, Debug, PartialEq, ElementName)]
#[element_name(name = "logout")]
/// Type corresponding to the <logout> tag in an EPP XML logout request
/// Type corresponding to the &lt;logout&gt; tag in an EPP XML logout request
pub struct Logout;
impl EppLogout {

View File

@ -7,7 +7,7 @@ use crate::epp::request::Command;
use crate::epp::xml::EPP_CONTACT_XMLNS;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for contact <check> command
/// Type that represents the &lt;epp&gt; request for contact &lt;check&gt; command
///
/// ## Usage
///
@ -39,10 +39,10 @@ use serde::{Deserialize, Serialize};
/// ```
pub type EppContactCheck = EppObject<Command<ContactCheck>>;
/// Type that represents the <check> command for contact transactions
/// Type that represents the &lt;check&gt; command for contact transactions
#[derive(Serialize, Deserialize, Debug)]
pub struct ContactList {
/// The XML namespace for the contact <check>
/// The XML namespace for the contact &lt;check&gt;
xmlns: String,
/// The list of contact ids to check for availability
#[serde(rename = "id")]
@ -51,15 +51,15 @@ pub struct ContactList {
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "check")]
/// The <command> type for contact check command
/// The &lt;command&gt; type for contact check command
pub struct ContactCheck {
/// The <check> tag for the contact check command
/// The &lt;check&gt; tag for the contact check command
#[serde(rename = "check")]
list: ContactList,
}
impl EppContactCheck {
/// Creates an EppObject corresponding to the <epp> tag with data for a contact check request
/// Creates an EppObject corresponding to the &lt;epp&gt; tag with data for a contact check request
pub fn new(contact_ids: Vec<&str>, client_tr_id: &str) -> EppContactCheck {
let contact_ids = contact_ids
.iter()

View File

@ -8,7 +8,7 @@ use crate::epp::request::Command;
use crate::epp::xml::EPP_CONTACT_XMLNS;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for contact <create> command
/// Type that represents the &lt;epp&gt; request for contact &lt;create&gt; command
///
/// ## Usage
///
@ -55,38 +55,38 @@ use serde::{Deserialize, Serialize};
/// ```
pub type EppContactCreate = EppObject<Command<ContactCreate>>;
/// Type for elements under the contact <create> tag
/// Type for elements under the contact &lt;create&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct Contact {
/// XML namespace for contact commands
xmlns: String,
/// Contact <id> tag
/// Contact &lt;id&gt; tag
id: StringValue,
/// Contact <postalInfo> tag
/// Contact &lt;postalInfo&gt; tag
#[serde(rename = "postalInfo")]
postal_info: data::PostalInfo,
/// Contact <voice> tag
/// Contact &lt;voice&gt; tag
voice: data::Phone,
/// Contact <fax> tag,
/// Contact &lt;fax&gt; tag,
fax: Option<data::Phone>,
/// Contact <email> tag
/// Contact &lt;email&gt; tag
email: StringValue,
/// Contact <authInfo> tag
/// Contact &lt;authInfo&gt; tag
#[serde(rename = "authInfo")]
auth_info: data::AuthInfo,
}
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "create")]
/// Type for EPP XML <create> command for contacts
/// Type for EPP XML &lt;create&gt; command for contacts
pub struct ContactCreate {
/// Data for <create> command for contact
/// Data for &lt;create&gt; command for contact
#[serde(rename = "create")]
pub contact: Contact,
}
impl EppContactCreate {
/// Creates a new EppObject for contact create corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for contact create corresponding to the &lt;epp&gt; tag in EPP XML
pub fn new(
id: &str,
email: &str,
@ -113,7 +113,7 @@ impl EppContactCreate {
})
}
/// Sets the <fax> data for the request
/// Sets the &lt;fax&gt; data for the request
pub fn set_fax(&mut self, fax: data::Phone) {
self.data.command.contact.fax = Some(fax);
}

View File

@ -7,7 +7,7 @@ use crate::epp::request::Command;
use crate::epp::xml::EPP_CONTACT_XMLNS;
use serde::{Deserialize, Serialize};
/// Type for the <epp> request for contact <delete> command
/// Type for the &lt;epp&gt; request for contact &lt;delete&gt; command
///
/// ## Usage
///
@ -39,10 +39,10 @@ use serde::{Deserialize, Serialize};
/// ```
pub type EppContactDelete = EppObject<Command<ContactDelete>>;
/// Type containing the data for the <delete> tag for contacts
/// Type containing the data for the &lt;delete&gt; tag for contacts
#[derive(Serialize, Deserialize, Debug)]
pub struct ContactDeleteData {
/// XML namespace for the <delete> command for contacts
/// XML namespace for the &lt;delete&gt; command for contacts
xmlns: String,
/// The id of the contact to be deleted
id: StringValue,
@ -50,15 +50,15 @@ pub struct ContactDeleteData {
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "delete")]
/// The <delete> type for the contact delete EPP command
/// The &lt;delete&gt; type for the contact delete EPP command
pub struct ContactDelete {
#[serde(rename = "delete")]
/// The data for the <delete> tag for a contact delete command
/// The data for the &lt;delete&gt; tag for a contact delete command
contact: ContactDeleteData,
}
impl EppContactDelete {
/// Creates a new EppObject for contact delete corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for contact delete corresponding to the &lt;epp&gt; tag in EPP XML
pub fn new(id: &str, client_tr_id: &str) -> EppContactDelete {
EppObject::build(Command::<ContactDelete> {
command: ContactDelete {

View File

@ -8,7 +8,7 @@ use crate::epp::request::Command;
use crate::epp::xml::EPP_CONTACT_XMLNS;
use serde::{Deserialize, Serialize};
/// Type for the <epp> request for contact <info> command
/// Type for the &lt;epp&gt; request for contact &lt;info&gt; command
///
/// ## Usage
///
@ -41,29 +41,29 @@ use serde::{Deserialize, Serialize};
/// ```
pub type EppContactInfo = EppObject<Command<ContactInfo>>;
/// Type for elements under the contact <info> tag
/// Type for elements under the contact &lt;info&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct ContactInfoData {
/// XML namespace for contact commands
xmlns: String,
/// The contact id for the info command
id: StringValue,
/// The <authInfo> data
/// The &lt;authInfo&gt; data
#[serde(rename = "authInfo")]
auth_info: AuthInfo,
}
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "info")]
/// Type for EPP XML <info> command for contacts
/// Type for EPP XML &lt;info&gt; command for contacts
pub struct ContactInfo {
/// Data for <info> command for contact
/// Data for &lt;info&gt; command for contact
#[serde(rename = "info")]
info: ContactInfoData,
}
impl EppContactInfo {
/// Creates a new EppObject for contact info corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for contact info corresponding to the &lt;epp&gt; tag in EPP XML
pub fn new(id: &str, auth_password: &str, client_tr_id: &str) -> EppContactInfo {
EppObject::build(Command::<ContactInfo> {
command: ContactInfo {

View File

@ -10,7 +10,7 @@ use crate::epp::xml::EPP_CONTACT_XMLNS;
use crate::error;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for contact <update> command
/// Type that represents the &lt;epp&gt; request for contact &lt;update&gt; command
///
/// ## Usage
///
@ -50,7 +50,7 @@ use serde::{Deserialize, Serialize};
/// ```
pub type EppContactUpdate = EppObject<Command<ContactUpdate>>;
/// Type for elements under the <chg> tag for contact update request
/// Type for elements under the &lt;chg&gt; tag for contact update request
#[derive(Serialize, Deserialize, Debug)]
pub struct ContactChangeInfo {
#[serde(rename = "postalInfo")]
@ -62,13 +62,13 @@ pub struct ContactChangeInfo {
auth_info: Option<AuthInfo>,
}
/// Type for list of elements of the <status> tag for contact update request
/// Type for list of elements of the &lt;status&gt; tag for contact update request
#[derive(Serialize, Deserialize, Debug)]
pub struct StatusList {
status: Vec<ContactStatus>,
}
/// Type for elements under the contact <update> tag
/// Type for elements under the contact &lt;update&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct ContactUpdateData {
xmlns: String,
@ -83,15 +83,15 @@ pub struct ContactUpdateData {
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "update")]
/// Type for EPP XML <update> command for contacts
/// Type for EPP XML &lt;update&gt; command for contacts
pub struct ContactUpdate {
/// The data under the <update> tag for the contact update
/// The data under the &lt;update&gt; tag for the contact update
#[serde(rename = "update")]
contact: ContactUpdateData,
}
impl EppContactUpdate {
/// Creates a new EppObject for contact update corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for contact update corresponding to the &lt;epp&gt; tag in EPP XML
pub fn new(id: &str, client_tr_id: &str) -> EppContactUpdate {
EppObject::build(Command::<ContactUpdate> {
command: ContactUpdate {
@ -107,7 +107,7 @@ impl EppContactUpdate {
})
}
/// Sets the data for the <chg> tag for the contact update request
/// Sets the data for the &lt;chg&gt; tag for the contact update request
pub fn set_info(
&mut self,
email: &str,
@ -124,7 +124,7 @@ impl EppContactUpdate {
});
}
/// Sets the data for the <fax> tag under <chg> for the contact update request
/// Sets the data for the &lt;fax&gt; tag under &lt;chg&gt; for the contact update request
pub fn set_fax(&mut self, fax: Phone) {
match &mut self.data.command.contact.change_info {
Some(ref mut info) => info.fax = Some(fax),
@ -132,17 +132,17 @@ impl EppContactUpdate {
}
}
/// Sets the data for the <add> tag for the contact update request
/// Sets the data for the &lt;add&gt; tag for the contact update request
pub fn add(&mut self, statuses: Vec<ContactStatus>) {
self.data.command.contact.add_statuses = Some(StatusList { status: statuses });
}
/// Sets the data for the <rem> tag for the contact update request
/// Sets the data for the &lt;rem&gt; tag for the contact update request
pub fn remove(&mut self, statuses: Vec<ContactStatus>) {
self.data.command.contact.remove_statuses = Some(StatusList { status: statuses });
}
/// Loads data into the <chg> tag from an existing EppContactInfoResponse object
/// Loads data into the &lt;chg&gt; tag from an existing EppContactInfoResponse object
pub fn load_from_epp_contact_info(
&mut self,
contact_info: EppContactInfoResponse,

View File

@ -7,7 +7,7 @@ use crate::epp::request::Command;
use crate::epp::xml::EPP_DOMAIN_XMLNS;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for domain <check> command
/// Type that represents the &lt;epp&gt; request for domain &lt;check&gt; command
///
/// ## Usage
///
@ -39,7 +39,7 @@ use serde::{Deserialize, Serialize};
/// ```
pub type EppDomainCheck = EppObject<Command<DomainCheck>>;
/// Type for <name> elements under the domain <check> tag
/// Type for &lt;name&gt; elements under the domain &lt;check&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainList {
/// XML namespace for domain commands
@ -51,7 +51,7 @@ pub struct DomainList {
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "check")]
/// Type for EPP XML <check> command for domains
/// Type for EPP XML &lt;check&gt; command for domains
pub struct DomainCheck {
/// The object holding the list of domains to be checked
#[serde(rename = "check")]
@ -59,7 +59,7 @@ pub struct DomainCheck {
}
impl EppDomainCheck {
/// Creates a new EppObject for domain check corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for domain check corresponding to the &lt;epp&gt; tag in EPP XML
pub fn new(domains: Vec<&str>, client_tr_id: &str) -> EppDomainCheck {
let domains = domains
.iter()

View File

@ -10,8 +10,8 @@ use crate::epp::request::Command;
use crate::epp::xml::EPP_DOMAIN_XMLNS;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for domain <create> command
/// with <hostObj> elements in the request for <ns> list
/// Type that represents the &lt;epp&gt; request for domain &lt;create&gt; command
/// with &lt;hostObj&gt; elements in the request for &lt;ns&gt; list
///
/// ## Usage
///
@ -58,11 +58,11 @@ use serde::{Deserialize, Serialize};
/// }
/// ```
pub type EppDomainCreate = EppObject<Command<DomainCreate<HostObjList>>>;
/// Type that represents the <epp> request for domain <create> command
/// with <hostAttr> elements in the request for <ns> list
/// Type that represents the &lt;epp&gt; request for domain &lt;create&gt; command
/// with &lt;hostAttr&gt; elements in the request for &lt;ns&gt; list
pub type EppDomainCreateWithHostAttr = EppObject<Command<DomainCreate<HostAttrList>>>;
/// Type for elements under the domain <create> tag
/// Type for elements under the domain &lt;create&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainCreateData<T> {
/// XML namespace for domain commands
@ -86,7 +86,7 @@ pub struct DomainCreateData<T> {
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "create")]
/// Type for EPP XML <create> command for domains
/// Type for EPP XML &lt;create&gt; command for domains
pub struct DomainCreate<T> {
/// The data for the domain to be created with
/// T being the type of nameserver list (`HostObjList` or `HostAttrList`)
@ -96,8 +96,8 @@ pub struct DomainCreate<T> {
}
impl EppDomainCreate {
/// Creates a new EppObject for domain create corresponding to the <epp> tag in EPP XML
/// with the <ns> tag containing <hostObj> tags
/// Creates a new EppObject for domain create corresponding to the &lt;epp&gt; tag in EPP XML
/// with the &lt;ns&gt; tag containing &lt;hostObj&gt; tags
pub fn new_with_ns(
name: &str,
period: u16,
@ -128,7 +128,7 @@ impl EppDomainCreate {
})
}
/// Creates a new EppObject for domain create corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for domain create corresponding to the &lt;epp&gt; tag in EPP XML
/// without any nameservers
pub fn new(
name: &str,
@ -154,7 +154,7 @@ impl EppDomainCreate {
})
}
/// Creates a new EppObject for domain create corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for domain create corresponding to the &lt;epp&gt; tag in EPP XML
/// without any contacts
pub fn new_without_contacts(
name: &str,
@ -178,8 +178,8 @@ impl EppDomainCreate {
})
}
/// Creates a new EppObject for domain create corresponding to the <epp> tag in EPP XML
/// with the <ns> tag containing <hostAttr> tags
/// Creates a new EppObject for domain create corresponding to the &lt;epp&gt; tag in EPP XML
/// with the &lt;ns&gt; tag containing &lt;hostAttr&gt; tags
pub fn new_with_host_attr(
name: &str,
period: u16,

View File

@ -7,7 +7,7 @@ use crate::epp::request::Command;
use crate::epp::xml::EPP_DOMAIN_XMLNS;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for domain <delete> command
/// Type that represents the &lt;epp&gt; request for domain &lt;delete&gt; command
///
/// ## Usage
///
@ -36,7 +36,7 @@ use serde::{Deserialize, Serialize};
/// ```
pub type EppDomainDelete = EppObject<Command<DomainDelete>>;
/// Type for <name> element under the domain <delete> tag
/// Type for &lt;name&gt; element under the domain &lt;delete&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainDeleteData {
/// XML namespace for domain commands
@ -47,15 +47,15 @@ pub struct DomainDeleteData {
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "delete")]
/// Type for EPP XML <delete> command for domains
/// Type for EPP XML &lt;delete&gt; command for domains
pub struct DomainDelete {
/// The data under the <delete> tag for domain deletion
/// The data under the &lt;delete&gt; tag for domain deletion
#[serde(rename = "delete")]
domain: DomainDeleteData,
}
impl EppDomainDelete {
/// Creates a new EppObject for domain delete corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for domain delete corresponding to the &lt;epp&gt; tag in EPP XML
pub fn new(name: &str, client_tr_id: &str) -> EppDomainDelete {
EppObject::build(Command::<DomainDelete> {
command: DomainDelete {

View File

@ -7,7 +7,7 @@ use crate::epp::request::Command;
use crate::epp::xml::EPP_DOMAIN_XMLNS;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for domain <info> command
/// Type that represents the &lt;epp&gt; request for domain &lt;info&gt; command
///
/// ## Usage
///
@ -36,7 +36,7 @@ use serde::{Deserialize, Serialize};
/// ```
pub type EppDomainInfo = EppObject<Command<DomainInfo>>;
/// Type for data under the <name> element tag for the domain <info> tag
/// Type for data under the &lt;name&gt; element tag for the domain &lt;info&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct Domain {
/// The hosts attribute. Default value is "all"
@ -46,7 +46,7 @@ pub struct Domain {
name: String,
}
/// Type for <name> element under the domain <info> tag
/// Type for &lt;name&gt; element under the domain &lt;info&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainInfoData {
/// XML namespace for domain commands
@ -58,15 +58,15 @@ pub struct DomainInfoData {
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "info")]
/// Type for EPP XML <info> command for domains
/// Type for EPP XML &lt;info&gt; command for domains
pub struct DomainInfo {
/// The data under the <info> tag for domain info
/// The data under the &lt;info&gt; tag for domain info
#[serde(rename = "info")]
info: DomainInfoData,
}
impl EppDomainInfo {
/// Creates a new EppObject for domain info corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for domain info corresponding to the &lt;epp&gt; tag in EPP XML
pub fn new(name: &str, client_tr_id: &str) -> EppDomainInfo {
EppObject::build(Command::<DomainInfo> {
command: DomainInfo {

View File

@ -9,7 +9,7 @@ use crate::epp::xml::EPP_DOMAIN_XMLNS;
use chrono::NaiveDate;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for domain <renew> command
/// Type that represents the &lt;epp&gt; request for domain &lt;renew&gt; command
///
/// ## Usage
///
@ -42,7 +42,7 @@ use serde::{Deserialize, Serialize};
/// ```
pub type EppDomainRenew = EppObject<Command<DomainRenew>>;
/// Type for data under the domain <renew> tag
/// Type for data under the domain &lt;renew&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainRenewData {
/// XML namespace for domain commands
@ -58,15 +58,15 @@ pub struct DomainRenewData {
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "renew")]
/// Type for EPP XML <renew> command for domains
/// Type for EPP XML &lt;renew&gt; command for domains
pub struct DomainRenew {
/// The data under the <renew> tag for the domain renewal
/// The data under the &lt;renew&gt; tag for the domain renewal
#[serde(rename = "renew")]
domain: DomainRenewData,
}
impl EppDomainRenew {
/// Creates a new EppObject for domain renew corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for domain renew corresponding to the &lt;epp&gt; tag in EPP XML
pub fn new(
name: &str,
current_expiry_date: NaiveDate,

View File

@ -8,7 +8,7 @@ use crate::epp::request::Command;
use crate::epp::xml::EPP_DOMAIN_XMLNS;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for transfer request for domain
/// Type that represents the &lt;epp&gt; request for transfer request for domain
///
/// ## Usage
///
@ -39,7 +39,7 @@ use serde::{Deserialize, Serialize};
/// ```
pub type EppDomainTransferRequest = EppObject<Command<DomainTransfer>>;
/// Type that represents the <epp> request for transfer approval for domains
/// Type that represents the &lt;epp&gt; request for transfer approval for domains
///
/// ## Usage
///
@ -70,7 +70,7 @@ pub type EppDomainTransferRequest = EppObject<Command<DomainTransfer>>;
/// ```
pub type EppDomainTransferApprove = EppObject<Command<DomainTransfer>>;
/// Type that represents the <epp> request for transfer rejection for domains
/// Type that represents the &lt;epp&gt; request for transfer rejection for domains
///
/// ## Usage
///
@ -101,7 +101,7 @@ pub type EppDomainTransferApprove = EppObject<Command<DomainTransfer>>;
/// ```
pub type EppDomainTransferReject = EppObject<Command<DomainTransfer>>;
/// Type that represents the <epp> request for transfer request cancellation for domains
/// Type that represents the &lt;epp&gt; request for transfer request cancellation for domains
///
/// ## Usage
///
@ -132,7 +132,7 @@ pub type EppDomainTransferReject = EppObject<Command<DomainTransfer>>;
/// ```
pub type EppDomainTransferCancel = EppObject<Command<DomainTransfer>>;
/// Type that represents the <epp> request for transfer request query for domains
/// Type that represents the &lt;epp&gt; request for transfer request query for domains
///
/// ## Usage
///
@ -163,7 +163,7 @@ pub type EppDomainTransferCancel = EppObject<Command<DomainTransfer>>;
/// ```
pub type EppDomainTransferQuery = EppObject<Command<DomainTransfer>>;
/// Type for elements under the domain <transfer> tag
/// Type for elements under the domain &lt;transfer&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainTransferData {
/// XML namespace for domain commands
@ -181,19 +181,19 @@ pub struct DomainTransferData {
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "transfer")]
/// Type for EPP XML <transfer> command for domains
/// Type for EPP XML &lt;transfer&gt; command for domains
pub struct DomainTransfer {
/// The transfer operation to perform indicated by the 'op' attr
/// The values are one of transfer, approve, reject, cancel, or query
#[serde(rename = "op")]
operation: String,
/// The data under the <transfer> tag in the transfer request
/// The data under the &lt;transfer&gt; tag in the transfer request
#[serde(rename = "transfer")]
domain: DomainTransferData,
}
impl EppDomainTransferRequest {
/// Creates a new EppObject for domain transfer request corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for domain transfer request corresponding to the &lt;epp&gt; tag in EPP XML
pub fn request(
name: &str,
years: u16,
@ -221,7 +221,7 @@ impl EppDomainTransferRequest {
}
impl EppDomainTransferApprove {
/// Creates a new EppObject for domain transfer approval corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for domain transfer approval corresponding to the &lt;epp&gt; tag in EPP XML
pub fn approve(name: &str, client_tr_id: &str) -> EppDomainTransferApprove {
EppObject::build(Command::<DomainTransfer> {
command: DomainTransfer {
@ -239,7 +239,7 @@ impl EppDomainTransferApprove {
}
impl EppDomainTransferCancel {
/// Creates a new EppObject for domain transfer request cancellation corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for domain transfer request cancellation corresponding to the &lt;epp&gt; tag in EPP XML
pub fn cancel(name: &str, client_tr_id: &str) -> EppDomainTransferCancel {
EppObject::build(Command::<DomainTransfer> {
command: DomainTransfer {
@ -257,7 +257,7 @@ impl EppDomainTransferCancel {
}
impl EppDomainTransferReject {
/// Creates a new EppObject for domain transfer rejection corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for domain transfer rejection corresponding to the &lt;epp&gt; tag in EPP XML
pub fn reject(name: &str, client_tr_id: &str) -> EppDomainTransferReject {
EppObject::build(Command::<DomainTransfer> {
command: DomainTransfer {
@ -275,7 +275,7 @@ impl EppDomainTransferReject {
}
impl EppDomainTransferQuery {
/// Creates a new EppObject for domain transfer request query corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for domain transfer request query corresponding to the &lt;epp&gt; tag in EPP XML
pub fn query(name: &str, auth_password: &str, client_tr_id: &str) -> EppDomainTransferQuery {
EppObject::build(Command::<DomainTransfer> {
command: DomainTransfer {

View File

@ -8,8 +8,8 @@ use crate::epp::request::Command;
use crate::epp::xml::EPP_DOMAIN_XMLNS;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for domain <update> command
/// with <hostObj> elements in the request for <ns> list
/// Type that represents the &lt;epp&gt; request for domain &lt;update&gt; command
/// with &lt;hostObj&gt; elements in the request for &lt;ns&gt; list
///
/// ## Usage
///
@ -62,11 +62,11 @@ use serde::{Deserialize, Serialize};
/// }
/// ```
pub type EppDomainUpdate = EppObject<Command<DomainUpdate<HostObjList>>>;
/// Type that represents the <epp> request for domain <update> command
/// with <hostAttr> elements in the request for <ns> list
/// Type that represents the &lt;epp&gt; request for domain &lt;update&gt; command
/// with &lt;hostAttr&gt; elements in the request for &lt;ns&gt; list
pub type EppDomainUpdateWithHostAttr = EppObject<Command<DomainUpdate<HostAttrList>>>;
/// Type for elements under the <chg> tag for domain update
/// Type for elements under the &lt;chg&gt; tag for domain update
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainChangeInfo {
/// The new registrant contact for the domain
@ -76,7 +76,7 @@ pub struct DomainChangeInfo {
pub auth_info: Option<AuthInfo>,
}
/// Type for elements under the <add> and <rem> tags for domain update
/// Type for elements under the &lt;add&gt; and &lt;rem&gt; tags for domain update
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainAddRemove<T> {
/// The list of nameservers to add or remove
@ -91,7 +91,7 @@ pub struct DomainAddRemove<T> {
pub statuses: Option<Vec<DomainStatus>>,
}
/// Type for elements under the <update> tag for domain update
/// Type for elements under the &lt;update&gt; tag for domain update
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainUpdateData<T> {
/// XML namespace for domain commands
@ -105,22 +105,22 @@ pub struct DomainUpdateData<T> {
/// from the domain
#[serde(rename = "rem")]
remove: Option<DomainAddRemove<T>>,
/// The data under the <chg> tag for domain update
/// The data under the &lt;chg&gt; tag for domain update
#[serde(rename = "chg")]
change_info: Option<DomainChangeInfo>,
}
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "update")]
/// Type for EPP XML <update> command for domains
/// Type for EPP XML &lt;update&gt; command for domains
pub struct DomainUpdate<T> {
#[serde(rename = "update")]
domain: DomainUpdateData<T>,
}
impl EppDomainUpdate {
/// Creates a new EppObject for domain update corresponding to the <epp> tag in EPP XML
/// with the <ns> tag containing <hostObj> tags
/// Creates a new EppObject for domain update corresponding to the &lt;epp&gt; tag in EPP XML
/// with the &lt;ns&gt; tag containing &lt;hostObj&gt; tags
pub fn new(name: &str, client_tr_id: &str) -> EppDomainUpdate {
EppObject::build(Command::<DomainUpdate<HostObjList>> {
command: DomainUpdate {
@ -136,25 +136,25 @@ impl EppDomainUpdate {
})
}
/// Sets the data for the <chg> tag
/// Sets the data for the &lt;chg&gt; tag
pub fn info(&mut self, info: DomainChangeInfo) {
self.data.command.domain.change_info = Some(info);
}
/// Sets the data for the <add> tag
/// Sets the data for the &lt;add&gt; tag
pub fn add(&mut self, add: DomainAddRemove<HostObjList>) {
self.data.command.domain.add = Some(add);
}
/// Sets the data for the <rem> tag
/// Sets the data for the &lt;rem&gt; tag
pub fn remove(&mut self, remove: DomainAddRemove<HostObjList>) {
self.data.command.domain.remove = Some(remove);
}
}
impl EppDomainUpdateWithHostAttr {
/// Creates a new EppObject for domain update corresponding to the <epp> tag in EPP XML
/// with the <ns> tag containing <hostAttr> tags
/// Creates a new EppObject for domain update corresponding to the &lt;epp&gt; tag in EPP XML
/// with the &lt;ns&gt; tag containing &lt;hostAttr&gt; tags
pub fn new(name: &str, client_tr_id: &str) -> EppDomainUpdateWithHostAttr {
EppObject::build(Command::<DomainUpdate<HostAttrList>> {
command: DomainUpdate {
@ -170,17 +170,17 @@ impl EppDomainUpdateWithHostAttr {
})
}
/// Sets the data for the <chg> tag
/// Sets the data for the &lt;chg&gt; tag
pub fn info(&mut self, info: DomainChangeInfo) {
self.data.command.domain.change_info = Some(info);
}
/// Sets the data for the <add> tag
/// Sets the data for the &lt;add&gt; tag
pub fn add(&mut self, add: DomainAddRemove<HostAttrList>) {
self.data.command.domain.add = Some(add);
}
/// Sets the data for the <rem> tag
/// Sets the data for the &lt;rem&gt; tag
pub fn remove(&mut self, remove: DomainAddRemove<HostAttrList>) {
self.data.command.domain.remove = Some(remove);
}

View File

@ -7,7 +7,7 @@ use crate::epp::request::Command;
use crate::epp::xml::EPP_HOST_XMLNS;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for host <check> command
/// Type that represents the &lt;epp&gt; request for host &lt;check&gt; command
///
/// ## Usage
///
@ -39,7 +39,7 @@ use serde::{Deserialize, Serialize};
/// ```
pub type EppHostCheck = EppObject<Command<HostCheck>>;
/// Type for data under the host <check> tag
/// Type for data under the host &lt;check&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct HostList {
/// XML namespace for host commands
@ -51,7 +51,7 @@ pub struct HostList {
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "check")]
/// Type for EPP XML <check> command for hosts
/// Type for EPP XML &lt;check&gt; command for hosts
pub struct HostCheck {
/// The instance holding the list of hosts to be checked
#[serde(rename = "check")]
@ -59,7 +59,7 @@ pub struct HostCheck {
}
impl EppHostCheck {
/// Creates a new EppObject for host check corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for host check corresponding to the &lt;epp&gt; tag in EPP XML
pub fn new(hosts: Vec<&str>, client_tr_id: &str) -> EppHostCheck {
let hosts = hosts
.iter()

View File

@ -8,7 +8,7 @@ use crate::epp::request::Command;
use crate::epp::xml::EPP_HOST_XMLNS;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for host <create> command
/// Type that represents the &lt;epp&gt; request for host &lt;create&gt; command
///
/// ## Usage
///
@ -44,7 +44,7 @@ use serde::{Deserialize, Serialize};
/// ```
pub type EppHostCreate = EppObject<Command<HostCreate>>;
/// Type for data under the host <create> tag
/// Type for data under the host &lt;create&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct HostCreateData {
/// XML namespace for host commands
@ -58,7 +58,7 @@ pub struct HostCreateData {
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "create")]
/// Type for EPP XML <create> command for hosts
/// Type for EPP XML &lt;create&gt; command for hosts
pub struct HostCreate {
/// The instance holding the data for the host to be created
#[serde(rename = "create")]
@ -66,7 +66,7 @@ pub struct HostCreate {
}
impl EppHostCreate {
/// Creates a new EppObject for host create corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for host create corresponding to the &lt;epp&gt; tag in EPP XML
pub fn new(host: &str, addresses: Vec<HostAddr>, client_tr_id: &str) -> EppHostCreate {
let host_create = HostCreate {
host: HostCreateData {

View File

@ -7,7 +7,7 @@ use crate::epp::request::Command;
use crate::epp::xml::EPP_HOST_XMLNS;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for host <delete> command
/// Type that represents the &lt;epp&gt; request for host &lt;delete&gt; command
///
/// ## Usage
///
@ -36,7 +36,7 @@ use serde::{Deserialize, Serialize};
/// ```
pub type EppHostDelete = EppObject<Command<HostDelete>>;
/// Type for data under the host <delete> tag
/// Type for data under the host &lt;delete&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct HostDeleteData {
/// XML namespace for host commands
@ -47,7 +47,7 @@ pub struct HostDeleteData {
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "delete")]
/// Type for EPP XML <delete> command for hosts
/// Type for EPP XML &lt;delete&gt; command for hosts
pub struct HostDelete {
/// The instance holding the data for the host to be deleted
#[serde(rename = "delete")]
@ -55,7 +55,7 @@ pub struct HostDelete {
}
impl EppHostDelete {
/// Creates a new EppObject for host delete corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for host delete corresponding to the &lt;epp&gt; tag in EPP XML
pub fn new(name: &str, client_tr_id: &str) -> EppHostDelete {
EppObject::build(Command::<HostDelete> {
command: HostDelete {

View File

@ -7,7 +7,7 @@ use crate::epp::request::Command;
use crate::epp::xml::EPP_HOST_XMLNS;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for host <info> command
/// Type that represents the &lt;epp&gt; request for host &lt;info&gt; command
///
/// ## Usage
///
@ -36,7 +36,7 @@ use serde::{Deserialize, Serialize};
/// ```
pub type EppHostInfo = EppObject<Command<HostInfo>>;
/// Type for data under the host <info> tag
/// Type for data under the host &lt;info&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct HostInfoData {
/// XML namespace for host commands
@ -47,7 +47,7 @@ pub struct HostInfoData {
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "info")]
/// Type for EPP XML <info> command for hosts
/// Type for EPP XML &lt;info&gt; command for hosts
pub struct HostInfo {
/// The instance holding the data for the host query
#[serde(rename = "info")]
@ -55,7 +55,7 @@ pub struct HostInfo {
}
impl EppHostInfo {
/// Creates a new EppObject for host info corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for host info corresponding to the &lt;epp&gt; tag in EPP XML
pub fn new(name: &str, client_tr_id: &str) -> EppHostInfo {
EppObject::build(Command::<HostInfo> {
command: HostInfo {

View File

@ -8,7 +8,7 @@ use crate::epp::request::Command;
use crate::epp::xml::EPP_HOST_XMLNS;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for host <update> command
/// Type that represents the &lt;epp&gt; request for host &lt;update&gt; command
///
/// ## Usage
///
@ -49,7 +49,7 @@ use serde::{Deserialize, Serialize};
/// host_update.add(add);
/// host_update.remove(remove);
///
/// // Send a <chg> section as well
/// // Send a &lt;chg&gt; section as well
/// host_update.info(HostChangeInfo { name: "ns2.eppdev-101.com".to_string_value() });
///
/// // send it to the registry and receive a response of type EppHostUpdateResponse
@ -60,14 +60,14 @@ use serde::{Deserialize, Serialize};
/// ```
pub type EppHostUpdate = EppObject<Command<HostUpdate>>;
/// Type for data under the <chg> tag
/// Type for data under the &lt;chg&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct HostChangeInfo {
/// The new name for the host
pub name: StringValue,
}
/// Type for data under the <add> and <rem> tags
/// Type for data under the &lt;add&gt; and &lt;rem&gt; tags
#[derive(Serialize, Deserialize, Debug)]
pub struct HostAddRemove {
/// The IP addresses to be added to or removed from the host
@ -78,7 +78,7 @@ pub struct HostAddRemove {
pub statuses: Option<Vec<HostStatus>>,
}
/// Type for data under the host <update> tag
/// Type for data under the host &lt;update&gt; tag
#[derive(Serialize, Deserialize, Debug)]
pub struct HostUpdateData {
/// XML namespace for host commands
@ -97,7 +97,7 @@ pub struct HostUpdateData {
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "update")]
/// Type for EPP XML <update> command for hosts
/// Type for EPP XML &lt;update&gt; command for hosts
pub struct HostUpdate {
/// The instance holding the data for the host to be updated
#[serde(rename = "update")]
@ -105,7 +105,7 @@ pub struct HostUpdate {
}
impl EppHostUpdate {
/// Creates a new EppObject for host update corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for host update corresponding to the &lt;epp&gt; tag in EPP XML
pub fn new(name: &str, client_tr_id: &str) -> EppHostUpdate {
EppObject::build(Command::<HostUpdate> {
command: HostUpdate {
@ -121,17 +121,17 @@ impl EppHostUpdate {
})
}
/// Sets the data for the <chg> element of the host update
/// Sets the data for the &lt;chg&gt; element of the host update
pub fn info(&mut self, info: HostChangeInfo) {
self.data.command.host.change_info = Some(info);
}
/// Sets the data for the <add> element of the host update
/// Sets the data for the &lt;add&gt; element of the host update
pub fn add(&mut self, add: HostAddRemove) {
self.data.command.host.add = Some(add);
}
/// Sets the data for the <rem> element of the host update
/// Sets the data for the &lt;rem&gt; element of the host update
pub fn remove(&mut self, remove: HostAddRemove) {
self.data.command.host.remove = Some(remove);
}

View File

@ -6,7 +6,7 @@ use crate::epp::object::{ElementName, EppObject, StringValueTrait};
use crate::epp::request::Command;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for registry <poll op="ack"> command
/// Type that represents the &lt;epp&gt; request for registry <poll op="ack"> command
/// ## Usage
///
/// ```ignore
@ -36,7 +36,7 @@ pub type EppMessageAck = EppObject<Command<MessageAck>>;
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "poll")]
/// Type for EPP XML <poll> command for message ack
/// Type for EPP XML &lt;poll&gt; command for message ack
pub struct MessageAck {
/// The type of operation to perform
/// The value is "ack" for message acknowledgement
@ -47,7 +47,7 @@ pub struct MessageAck {
}
impl EppMessageAck {
/// Creates a new EppObject for <poll> ack corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for &lt;poll&gt; ack corresponding to the &lt;epp&gt; tag in EPP XML
pub fn new(message_id: u32, client_tr_id: &str) -> EppMessageAck {
EppObject::build(Command::<MessageAck> {
command: MessageAck {

View File

@ -6,7 +6,7 @@ use crate::epp::object::{ElementName, EppObject, StringValueTrait};
use crate::epp::request::Command;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> request for registry <poll op="req"> command
/// Type that represents the &lt;epp&gt; request for registry <poll op="req"> command
///
/// ## Usage
///
@ -37,7 +37,7 @@ pub type EppMessagePoll = EppObject<Command<MessagePoll>>;
#[derive(Serialize, Deserialize, Debug, ElementName)]
#[element_name(name = "poll")]
/// Type for EPP XML <poll> command for message poll
/// Type for EPP XML &lt;poll&gt; command for message poll
pub struct MessagePoll {
/// The type of operation to perform
/// The value is "req" for message polling
@ -45,7 +45,7 @@ pub struct MessagePoll {
}
impl EppMessagePoll {
/// Creates a new EppObject for <poll> req corresponding to the <epp> tag in EPP XML
/// Creates a new EppObject for &lt;poll&gt; req corresponding to the &lt;epp&gt; tag in EPP XML
pub fn new(client_tr_id: &str) -> EppMessagePoll {
EppObject::build(Command::<MessagePoll> {
command: MessagePoll {

View File

@ -223,7 +223,7 @@ pub struct MessageQueue {
#[derive(Serialize, Deserialize, Debug, PartialEq, ElementName)]
#[serde(rename_all = "lowercase")]
#[element_name(name = "response")]
/// Type corresponding to the <response> tag in an EPP response XML
/// Type corresponding to the &lt;response&gt; tag in an EPP response XML
pub struct CommandResponse<T> {
/// Data under the <result> tag
pub result: EppResult,
@ -231,7 +231,7 @@ pub struct CommandResponse<T> {
#[serde(rename = "msgQ")]
pub message_queue: Option<MessageQueue>,
#[serde(rename = "resData")]
/// Data under the <resData> tag
/// Data under the &lt;resData&gt; tag
pub res_data: Option<T>,
/// Data under the <trID> tag
#[serde(rename = "trID")]
@ -240,8 +240,8 @@ pub struct CommandResponse<T> {
#[derive(Serialize, Deserialize, Debug, PartialEq, ElementName)]
#[element_name(name = "response")]
/// Type corresponding to the <response> tag in an EPP response XML
/// without <msgQ> or <resData> sections. Generally used for error handling
/// Type corresponding to the &lt;response&gt; tag in an EPP response XML
/// without <msgQ> or &lt;resData&gt; sections. Generally used for error handling
pub struct CommandResponseStatus {
/// Data under the <result> tag
pub result: EppResult,
@ -251,7 +251,7 @@ pub struct CommandResponseStatus {
}
impl<T> CommandResponse<T> {
/// Returns the data under the corresponding <resData> from the EPP XML
/// Returns the data under the corresponding &lt;resData&gt; from the EPP XML
pub fn res_data(&self) -> Option<&T> {
match &self.res_data {
Some(res_data) => Some(&res_data),

View File

@ -5,31 +5,31 @@ use serde::{Deserialize, Serialize};
use crate::epp::object::{EppObject, StringValue};
use crate::epp::response::CommandResponse;
/// Type that represents the <epp> tag for the EPP XML contact check response
/// Type that represents the &lt;epp&gt; tag for the EPP XML contact check response
pub type EppContactCheckResponse = EppObject<CommandResponse<ContactCheckResult>>;
/// Type that represents the <id> tag for contact check response
/// Type that represents the &lt;id&gt; tag for contact check response
#[derive(Serialize, Deserialize, Debug)]
pub struct ContactCheck {
/// The text of the <id> tag
/// The text of the &lt;id&gt; tag
#[serde(rename = "$value")]
pub id: StringValue,
/// The avail attr on the <id> tag
/// The avail attr on the &lt;id&gt; tag
#[serde(rename = "avail")]
pub available: u16,
}
/// Type that represents the <cd> tag for contact check response
/// Type that represents the &lt;cd&gt; tag for contact check response
#[derive(Serialize, Deserialize, Debug)]
pub struct ContactCheckDataItem {
/// Data under the <id> tag
/// Data under the &lt;id&gt; tag
#[serde(rename = "id")]
pub contact: ContactCheck,
/// The reason for (un)availability
pub reason: Option<StringValue>,
}
/// Type that represents the <chkData> tag for contact check response
/// Type that represents the &lt;chkData&gt; tag for contact check response
#[derive(Serialize, Deserialize, Debug)]
pub struct ContactCheckData {
/// XML namespace for contact response data
@ -38,15 +38,15 @@ pub struct ContactCheckData {
/// XML schema location for contact response data
#[serde(rename = "xsi:schemaLocation")]
schema_location: String,
/// Data under the <cd> tag
/// Data under the &lt;cd&gt; tag
#[serde(rename = "cd")]
pub contact_list: Vec<ContactCheckDataItem>,
}
/// Type that represents the <resData> tag for contact check response
/// Type that represents the &lt;resData&gt; tag for contact check response
#[derive(Serialize, Deserialize, Debug)]
pub struct ContactCheckResult {
/// Data under the <chkData> tag
/// Data under the &lt;chkData&gt; tag
#[serde(rename = "chkData")]
pub check_data: ContactCheckData,
}

View File

@ -5,10 +5,10 @@ use serde::{Deserialize, Serialize};
use crate::epp::object::{EppObject, StringValue};
use crate::epp::response::CommandResponse;
/// Type that represents the <epp> tag for the EPP XML contact create response
/// Type that represents the &lt;epp&gt; tag for the EPP XML contact create response
pub type EppContactCreateResponse = EppObject<CommandResponse<ContactCreateResult>>;
/// Type that represents the <creData> tag for contact create response
/// Type that represents the &lt;creData&gt; tag for contact create response
#[derive(Serialize, Deserialize, Debug)]
pub struct ContactCreateData {
/// XML namespace for contact response data
@ -24,10 +24,10 @@ pub struct ContactCreateData {
pub created_at: StringValue,
}
/// Type that represents the <resData> tag for contact create response
/// Type that represents the &lt;resData&gt; tag for contact create response
#[derive(Serialize, Deserialize, Debug)]
pub struct ContactCreateResult {
/// Data under the <creData> tag
/// Data under the &lt;creData&gt; tag
#[serde(rename = "creData")]
pub create_data: ContactCreateData,
}

View File

@ -2,5 +2,5 @@
use crate::epp::response::EppCommandResponse;
/// Type that represents the <epp> tag for the EPP XML contact delete response
/// Type that represents the &lt;epp&gt; tag for the EPP XML contact delete response
pub type EppContactDeleteResponse = EppCommandResponse;

View File

@ -6,10 +6,10 @@ use crate::epp::object::data::{AuthInfo, ContactStatus, Phone, PostalInfo};
use crate::epp::object::{EppObject, StringValue};
use crate::epp::response::CommandResponse;
/// Type that represents the <epp> tag for the EPP XML contact info response
/// Type that represents the &lt;epp&gt; tag for the EPP XML contact info response
pub type EppContactInfoResponse = EppObject<CommandResponse<ContactInfoResult>>;
/// Type that represents the <infData> tag for contact check response
/// Type that represents the &lt;infData&gt; tag for contact check response
#[derive(Serialize, Deserialize, Debug)]
pub struct ContactInfoData {
/// XML namespace for contact response data
@ -57,10 +57,10 @@ pub struct ContactInfoData {
pub auth_info: Option<AuthInfo>,
}
/// Type that represents the <resData> tag for contact info response
/// Type that represents the &lt;resData&gt; tag for contact info response
#[derive(Serialize, Deserialize, Debug)]
pub struct ContactInfoResult {
/// Data under the <infData> tag
/// Data under the &lt;infData&gt; tag
#[serde(rename = "infData")]
pub info_data: ContactInfoData,
}

View File

@ -2,5 +2,5 @@
use crate::epp::response::EppCommandResponse;
/// Type that represents the <epp> tag for the EPP XML contact update response
/// Type that represents the &lt;epp&gt; tag for the EPP XML contact update response
pub type EppContactUpdateResponse = EppCommandResponse;

View File

@ -5,10 +5,10 @@ use serde::{Deserialize, Serialize};
use crate::epp::object::{EppObject, StringValue};
use crate::epp::response::CommandResponse;
/// Type that represents the <epp> tag for the EPP XML domain check response
/// Type that represents the &lt;epp&gt; tag for the EPP XML domain check response
pub type EppDomainCheckResponse = EppObject<CommandResponse<DomainCheckResult>>;
/// Type that represents the <name> tag for domain check response
/// Type that represents the &lt;name&gt; tag for domain check response
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainCheck {
/// The domain name
@ -19,17 +19,17 @@ pub struct DomainCheck {
pub available: u16,
}
/// Type that represents the <cd> tag for domain check response
/// Type that represents the &lt;cd&gt; tag for domain check response
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainCheckDataItem {
/// Data under the <name> tag
/// Data under the &lt;name&gt; tag
#[serde(rename = "name")]
pub domain: DomainCheck,
/// The reason for (un)availability
pub reason: Option<StringValue>,
}
/// Type that represents the <chkData> tag for domain check response
/// Type that represents the &lt;chkData&gt; tag for domain check response
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainCheckData {
/// XML namespace for domain response data
@ -38,15 +38,15 @@ pub struct DomainCheckData {
/// XML schema location for domain response data
#[serde(rename = "xsi:schemaLocation")]
schema_location: String,
/// Data under the <cd> tag
/// Data under the &lt;cd&gt; tag
#[serde(rename = "cd")]
pub domain_list: Vec<DomainCheckDataItem>,
}
/// Type that represents the <resData> tag for domain check response
/// Type that represents the &lt;resData&gt; tag for domain check response
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainCheckResult {
/// Data under the <chkData> tag
/// Data under the &lt;chkData&gt; tag
#[serde(rename = "chkData")]
pub check_data: DomainCheckData,
}

View File

@ -5,10 +5,10 @@ use serde::{Deserialize, Serialize};
use crate::epp::object::{EppObject, StringValue};
use crate::epp::response::CommandResponse;
/// Type that represents the <epp> tag for the EPP XML domain create response
/// Type that represents the &lt;epp&gt; tag for the EPP XML domain create response
pub type EppDomainCreateResponse = EppObject<CommandResponse<DomainCreateResult>>;
/// Type that represents the <chkData> tag for domain create response
/// Type that represents the &lt;chkData&gt; tag for domain create response
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainCreateData {
/// XML namespace for domain response data
@ -27,10 +27,10 @@ pub struct DomainCreateData {
pub expiring_at: StringValue,
}
/// Type that represents the <resData> tag for domain create response
/// Type that represents the &lt;resData&gt; tag for domain create response
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainCreateResult {
/// Data under the <chkData> tag
/// Data under the &lt;chkData&gt; tag
#[serde(rename = "creData")]
pub create_data: DomainCreateData,
}

View File

@ -2,5 +2,5 @@
use crate::epp::response::EppCommandResponse;
/// Type that represents the <epp> tag for the EPP XML domain delete response
/// Type that represents the &lt;epp&gt; tag for the EPP XML domain delete response
pub type EppDomainDeleteResponse = EppCommandResponse;

View File

@ -6,18 +6,21 @@ use crate::epp::object::data::{AuthInfo, DomainContact, DomainStatus, HostAttr};
use crate::epp::object::{EppObject, StringValue};
use crate::epp::response::CommandResponse;
/// Type that represents the <epp> tag for the EPP XML domain info response
/// Type that represents the &lt;epp&gt; tag for the EPP XML domain info response
pub type EppDomainInfoResponse = EppObject<CommandResponse<DomainInfoResult>>;
/// The two types of ns lists, hostObj and hostAttr, that may be returned in the
/// domain info response
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainNsList {
/// List of &lt;hostObj&gt; ns elements
#[serde(rename = "hostObj")]
pub host_obj: Option<Vec<StringValue>>,
#[serde(rename = "hostAttr")]
/// List of &lt;hostAttr&gt; ns elements
pub host_attr: Option<Vec<HostAttr>>,
}
/// Type that represents the <infData> tag for domain info response
/// Type that represents the &lt;infData&gt; tag for domain info response
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainInfoData {
/// XML namespace for domain response data
@ -70,9 +73,10 @@ pub struct DomainInfoData {
pub auth_info: Option<AuthInfo>,
}
/// Type that represents the <resData> tag for domain info response
/// Type that represents the &lt;resData&gt; tag for domain info response
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainInfoResult {
/// Data under the &lt;resData&gt; tag
#[serde(rename = "infData")]
pub info_data: DomainInfoData,
}

View File

@ -4,10 +4,10 @@ use serde::{Deserialize, Serialize};
use crate::epp::object::{EppObject, StringValue};
use crate::epp::response::CommandResponse;
/// Type that represents the <epp> tag for the EPP XML domain renew response
/// Type that represents the &lt;epp&gt; tag for the EPP XML domain renew response
pub type EppDomainRenewResponse = EppObject<CommandResponse<DomainRenewResult>>;
/// Type that represents the <renData> tag for domain renew response
/// Type that represents the &lt;renData&gt; tag for domain renew response
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainRenewData {
/// XML namespace for domain response data
@ -23,10 +23,10 @@ pub struct DomainRenewData {
pub expiring_at: StringValue,
}
/// Type that represents the <resData> tag for domain renew response
/// Type that represents the &lt;resData&gt; tag for domain renew response
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainRenewResult {
/// Data under the <renData> tag
/// Data under the &lt;renData&gt; tag
#[serde(rename = "renData")]
pub renew_data: DomainRenewData,
}

View File

@ -5,18 +5,18 @@ use crate::epp::object::{EppObject, StringValue};
use crate::epp::response::CommandResponse;
use crate::epp::response::EppCommandResponse;
/// Type that represents the <epp> tag for the EPP XML domain transfer request response
/// Type that represents the &lt;epp&gt; tag for the EPP XML domain transfer request response
pub type EppDomainTransferRequestResponse = EppObject<CommandResponse<DomainTransferResult>>;
/// Type that represents the <epp> tag for the EPP XML domain transfer approval response
/// Type that represents the &lt;epp&gt; tag for the EPP XML domain transfer approval response
pub type EppDomainTransferApproveResponse = EppCommandResponse;
/// Type that represents the <epp> tag for the EPP XML domain transfer rejection response
/// Type that represents the &lt;epp&gt; tag for the EPP XML domain transfer rejection response
pub type EppDomainTransferRejectResponse = EppCommandResponse;
/// Type that represents the <epp> tag for the EPP XML domain transfer cancellation response
/// Type that represents the &lt;epp&gt; tag for the EPP XML domain transfer cancellation response
pub type EppDomainTransferCancelResponse = EppCommandResponse;
/// Type that represents the <epp> tag for the EPP XML domain transfer query response
/// Type that represents the &lt;epp&gt; tag for the EPP XML domain transfer query response
pub type EppDomainTransferQueryResponse = EppObject<CommandResponse<DomainTransferResult>>;
/// Type that represents the <trnData> tag for domain transfer response
/// Type that represents the &lt;trnData&gt; tag for domain transfer response
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainTransferData {
/// XML namespace for domain response data
@ -47,10 +47,10 @@ pub struct DomainTransferData {
pub expiring_at: StringValue,
}
/// Type that represents the <resData> tag for domain transfer response
/// Type that represents the &lt;resData&gt; tag for domain transfer response
#[derive(Serialize, Deserialize, Debug)]
pub struct DomainTransferResult {
/// Data under the <trnData> tag
/// Data under the &lt;trnData&gt; tag
#[serde(rename = "trnData")]
pub transfer_data: DomainTransferData,
}

View File

@ -2,5 +2,5 @@
use crate::epp::response::EppCommandResponse;
/// Type that represents the <epp> tag for the EPP XML domain update response
/// Type that represents the &lt;epp&gt; tag for the EPP XML domain update response
pub type EppDomainUpdateResponse = EppCommandResponse;

View File

@ -5,10 +5,10 @@ use serde::{Deserialize, Serialize};
use crate::epp::object::{EppObject, StringValue};
use crate::epp::response::CommandResponse;
/// Type that represents the <epp> tag for the EPP XML host check response
/// Type that represents the &lt;epp&gt; tag for the EPP XML host check response
pub type EppHostCheckResponse = EppObject<CommandResponse<HostCheckResult>>;
/// Type that represents the <name> tag for host check response
/// Type that represents the &lt;name&gt; tag for host check response
#[derive(Serialize, Deserialize, Debug)]
pub struct HostCheck {
/// The host name
@ -19,17 +19,17 @@ pub struct HostCheck {
pub available: u16,
}
/// Type that represents the <cd> tag for host check response
/// Type that represents the &lt;cd&gt; tag for host check response
#[derive(Serialize, Deserialize, Debug)]
pub struct HostCheckDataItem {
/// Data under the <name> tag
/// Data under the &lt;name&gt; tag
#[serde(rename = "name")]
pub host: HostCheck,
/// The reason for (un)availability
pub reason: Option<StringValue>,
}
/// Type that represents the <chkData> tag for host check response
/// Type that represents the &lt;chkData&gt; tag for host check response
#[derive(Serialize, Deserialize, Debug)]
pub struct HostCheckData {
/// XML namespace for host response data
@ -38,15 +38,15 @@ pub struct HostCheckData {
/// XML schema location for host response data
#[serde(rename = "xsi:schemaLocation")]
schema_location: String,
/// Data under the <cd> tag
/// Data under the &lt;cd&gt; tag
#[serde(rename = "cd")]
pub host_list: Vec<HostCheckDataItem>,
}
/// Type that represents the <resData> tag for host check response
/// Type that represents the &lt;resData&gt; tag for host check response
#[derive(Serialize, Deserialize, Debug)]
pub struct HostCheckResult {
/// Data under the <chkData> tag
/// Data under the &lt;chkData&gt; tag
#[serde(rename = "chkData")]
pub check_data: HostCheckData,
}

View File

@ -5,10 +5,10 @@ use serde::{Deserialize, Serialize};
use crate::epp::object::{EppObject, StringValue};
use crate::epp::response::CommandResponse;
/// Type that represents the <epp> tag for the EPP XML host create response
/// Type that represents the &lt;epp&gt; tag for the EPP XML host create response
pub type EppHostCreateResponse = EppObject<CommandResponse<HostCreateResult>>;
/// Type that represents the <creData> tag for host create response
/// Type that represents the &lt;creData&gt; tag for host create response
#[derive(Serialize, Deserialize, Debug)]
pub struct HostCreateData {
/// XML namespace for host response data
@ -24,10 +24,10 @@ pub struct HostCreateData {
pub created_at: StringValue,
}
/// Type that represents the <resData> tag for host check response
/// Type that represents the &lt;resData&gt; tag for host check response
#[derive(Serialize, Deserialize, Debug)]
pub struct HostCreateResult {
/// Data under the <creData> tag
/// Data under the &lt;creData&gt; tag
#[serde(rename = "creData")]
pub create_data: HostCreateData,
}

View File

@ -2,5 +2,5 @@
use crate::epp::response::EppCommandResponse;
/// Type that represents the <epp> tag for the EPP XML host delete response
/// Type that represents the &lt;epp&gt; tag for the EPP XML host delete response
pub type EppHostDeleteResponse = EppCommandResponse;

View File

@ -6,10 +6,10 @@ use crate::epp::object::data::{HostAddr, HostStatus};
use crate::epp::object::{EppObject, StringValue};
use crate::epp::response::CommandResponse;
/// Type that represents the <epp> tag for the EPP XML host info response
/// Type that represents the &lt;epp&gt; tag for the EPP XML host info response
pub type EppHostInfoResponse = EppObject<CommandResponse<HostInfoResult>>;
/// Type that represents the <infData> tag for host info response
/// Type that represents the &lt;infData&gt; tag for host info response
#[derive(Serialize, Deserialize, Debug)]
pub struct HostInfoData {
/// XML namespace for host response data
@ -48,10 +48,10 @@ pub struct HostInfoData {
pub transferred_at: Option<StringValue>,
}
/// Type that represents the <resData> tag for host info response
/// Type that represents the &lt;resData&gt; tag for host info response
#[derive(Serialize, Deserialize, Debug)]
pub struct HostInfoResult {
/// Data under the <infData> tag
/// Data under the &lt;infData&gt; tag
#[serde(rename = "infData")]
pub info_data: HostInfoData,
}

View File

@ -2,5 +2,5 @@
use crate::epp::response::EppCommandResponse;
/// Type that represents the <epp> tag for the EPP XML host update response
/// Type that represents the &lt;epp&gt; tag for the EPP XML host update response
pub type EppHostUpdateResponse = EppCommandResponse;

View File

@ -3,5 +3,5 @@
use crate::epp::object::EppObject;
use crate::epp::response::CommandResponse;
/// Type that represents the <epp> tag for the EPP XML message ack response
/// Type that represents the &lt;epp&gt; tag for the EPP XML message ack response
pub type EppMessageAckResponse = EppObject<CommandResponse<String>>;

View File

@ -4,10 +4,10 @@ use crate::epp::object::{EppObject, StringValue};
use crate::epp::response::CommandResponse;
use serde::{Deserialize, Serialize};
/// Type that represents the <epp> tag for the EPP XML message poll response
/// Type that represents the &lt;epp&gt; tag for the EPP XML message poll response
pub type EppMessagePollResponse = EppObject<CommandResponse<MessagePollResult>>;
/// Type that represents the <trnData> tag for message poll response
/// Type that represents the &lt;trnData&gt; tag for message poll response
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageDomainTransferData {
/// XML namespace for message response data
@ -35,10 +35,10 @@ pub struct MessageDomainTransferData {
pub expiring_at: StringValue,
}
/// Type that represents the <resData> tag for message poll response
/// Type that represents the &lt;resData&gt; tag for message poll response
#[derive(Serialize, Deserialize, Debug)]
pub struct MessagePollResult {
/// Data under the <trnData> tag
/// Data under the &lt;trnData&gt; tag
#[serde(rename = "trnData")]
pub message_data: MessageDomainTransferData,
}

View File

@ -1,31 +1,34 @@
//! EPP Client Library for the Extensible Provisioning Protocol (EPP).
//! # EPP (Extensible Provisioning Protocol) Client Library for Domain Registration and Management.
//!
//! ## Description
//!
//! epp-client is a client library for Internet domain registration and management for domain registrars.
//!
//! It supports the following basic Domain, Contact and Host management calls, with plans to add more calls
//! It supports the following basic Domain, Contact, Host, and Message management calls, with plans to add more calls
//! and other EPP extensions in the future, and to eventually be RFC compliant with the EPP protocol.
//!
//! - Domain Check
//! - Domain Create
//! - Domain Info
//! - Domain Update
//! - Domain Delete
//! - Domain Renew
//! - Domain Transfer
//! - Domain Check - [`EppDomainCheck`](epp/request/domain/check/type.EppDomainCheck.html)
//! - Domain Create - [`EppDomainCreate`](epp/request/domain/create/type.EppDomainCreate.html)
//! - Domain Info - [`EppDomainInfo`](epp/request/domain/info/type.EppDomainInfo.html)
//! - Domain Update - [`EppDomainUpdate`](epp/request/domain/update/type.EppDomainUpdate.html)
//! - Domain Delete - [`EppDomainDelete`](epp/request/domain/delete/type.EppDomainDelete.html)
//! - Domain Renew - [`EppDomainRenew`](epp/request/domain/renew/type.EppDomainRenew.html)
//! - Domain Transfer - [`EppDomainTransferRequest`](epp/request/domain/transfer/type.EppDomainTransferRequest.html)
//!
//! - Contact Check
//! - Contact Create
//! - Contact Info
//! - Contact Update
//! - Contact Delete
//! - Contact Check - [`EppContactCheck`](epp/request/contact/check/type.EppContactCheck.html)
//! - Contact Create - [`EppContactCreate`](epp/request/contact/create/type.EppContactCreate.html)
//! - Contact Info - [`EppContactInfo`](epp/request/contact/info/type.EppContactInfo.html)
//! - Contact Update - [`EppContactUpdate`](epp/request/contact/update/type.EppContactUpdate.html)
//! - Contact Delete - [`EppContactDelete`](epp/request/contact/delete/type.EppContactDelete.html)
//!
//! - Host Check
//! - Host Create
//! - Host Info
//! - Host Update
//! - Host Delete
//! - Host Check - [`EppHostCheck`](epp/request/host/check/type.EppHostCheck.html)
//! - Host Create - [`EppHostCreate`](epp/request/host/create/type.EppHostCreate.html)
//! - Host Info - [`EppHostInfo`](epp/request/host/info/type.EppHostInfo.html)
//! - Host Update - [`EppHostUpdate`](epp/request/host/update/type.EppHostUpdate.html)
//! - Host Delete - [`EppHostDelete`](epp/request/host/delete/type.EppHostDelete.html)
//!
//! - Message Poll - [`EppMessagePoll`](epp/request/message/poll/type.EppMessagePoll.html)
//! - Message Ack - [`EppMessageAck`](epp/request/message/ack/type.EppMessageAck.html)
//!
//! ## Prerequisites
//!
@ -44,7 +47,7 @@
//! # service extensions
//! ext_uris = []
//!
//! [registry.hexonet.tls_files]
//! [registry.verisign.tls_files]
//! # the full client certificate chain in PEM format
//! cert_chain = '/path/to/certificate/chain/pemfile'
//! # the RSA private key for your certificate
@ -72,7 +75,10 @@
//!
//! // Make a domain check call, which returns an object of type EppDomainCheckResponse
//! // that contains the result of the call
//! let domain_check = EppDomainCheck::new(vec!["eppdev.com", "eppdev.net"], generate_client_tr_id(&client).as_str());
//! let domain_check = EppDomainCheck::new(
//! vec!["eppdev.com", "eppdev.net"],
//! generate_client_tr_id(&client).as_str()
//! );
//!
//! let response = client.transact::<_, EppDomainCheckResponse>(&domain_check).await.unwrap();
//!