Update docs

This commit is contained in:
Nicholas Rempel 2021-11-05 15:14:05 -07:00 committed by masalachai
parent 445516e9e9
commit 5924b86cdd
24 changed files with 621 additions and 188 deletions

View File

@ -1,38 +1,31 @@
//! Config load module //! Config
//! //!
//! Loads the configuration and credentials for each registry connection from //! This module contains the connection configuration for the EPP client.
//! the `$XDG_CONFIG_HOME/epp-client/epp-client.toml` file
//!
//! ## Usage
//!
//! The config is automatically loaded when the module is initialized
//! and is available through the `epp_client::config::CONFIG` variable
//!
//! ## Sample config
//!
//! ```toml
//! [registry.verisign]
//! host = 'epp.verisign-grs.com'
//! port = 700
//! username = 'username'
//! password = 'password'
//! # service extensions
//! ext_uris = []
//!
//! [registry.hexonet.tls_files]
//! # the full client certificate chain in PEM format
//! cert_chain = '/path/to/certificate/chain/pemfile'
//! # the RSA private key for your certificate
//! key = '/path/to/private/key/pemfile'
//! ```
//! //!
//! ## Example //! ## Example
//! //!
//! ```rust //! ```no_run
//! use epp_client::config::CONFIG; //! use std::collections::HashMap;
//!
//! use epp_client::config::{EppClientConfig, EppClientConnection};
//!
//! // Create a config
//! let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
//! registry.insert(
//! "registry_name".to_owned(),
//! EppClientConnection {
//! host: "example.com".to_owned(),
//! port: 700,
//! username: "username".to_owned(),
//! password: "password".to_owned(),
//! ext_uris: None,
//! tls_files: None,
//! },
//! );
//! let config = EppClientConfig { registry };
//! //!
//! // Get configuration for the relevant registry section //! // Get configuration for the relevant registry section
//! let registry = CONFIG.registry("verisign").unwrap(); //! let registry = config.registry("verisign").unwrap();
//! //!
//! // Get EPP host name and port no. //! // Get EPP host name and port no.
//! let remote = registry.connection_details(); //! let remote = registry.connection_details();

View File

@ -2,16 +2,34 @@
//! //!
//! ## Example //! ## Example
//! //!
//! ```rust //! ```no_run
//! use std::collections::HashMap;
//!
//! use epp_client::config::{EppClientConfig, EppClientConnection};
//! use epp_client::EppClient; //! use epp_client::EppClient;
//! use epp_client::epp::{EppDomainCheck, EppDomainCheckResponse}; //! use epp_client::epp::{EppDomainCheck, EppDomainCheckResponse};
//! use epp_client::epp::generate_client_tr_id; //! use epp_client::epp::generate_client_tr_id;
//! //!
//! #[tokio::main] //! #[tokio::main]
//! async fn main() { //! async fn main() {
//! // Create an instance of EppClient, specifying the name of the registry as in //!
//! // the config file //! // Create a config
//! let mut client = match EppClient::new("verisign").await { //! let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
//! registry.insert(
//! "registry_name".to_owned(),
//! EppClientConnection {
//! host: "example.com".to_owned(),
//! port: 700,
//! username: "username".to_owned(),
//! password: "password".to_owned(),
//! ext_uris: None,
//! tls_files: None,
//! },
//! );
//! let config = EppClientConfig { registry };
//!
//! // Create an instance of EppClient, passing the config and the registry you want to connect to
//! let mut client = match EppClient::new(&config, "registry_name").await {
//! Ok(client) => client, //! Ok(client) => client,
//! Err(e) => panic!("Failed to create EppClient: {}", e) //! Err(e) => panic!("Failed to create EppClient: {}", e)
//! }; //! };
@ -24,6 +42,7 @@
//! 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(); //! let response = client.transact::<_, EppDomainCheckResponse>(&domain_check).await.unwrap();
//! println!("{:?}", response); //! println!("{:?}", response);
//!
//! } //! }
//! ``` //! ```

View File

@ -1,5 +1,4 @@
//! Types for EPP contact check request /// Types for EPP contact check request
use epp_client_macros::*; use epp_client_macros::*;
use crate::epp::object::{ElementName, EppObject, StringValue, StringValueTrait}; use crate::epp::object::{ElementName, EppObject, StringValue, StringValueTrait};
@ -11,16 +10,33 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```rust /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppContactCheck, EppContactCheckResponse}; /// use epp_client::epp::{EppContactCheck, EppContactCheckResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -12,7 +12,10 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::object::data::{Address, Phone, PostalInfo}; /// use epp_client::epp::object::data::{Address, Phone, PostalInfo};
/// use epp_client::epp::{EppContactCreate, EppContactCreateResponse}; /// use epp_client::epp::{EppContactCreate, EppContactCreateResponse};
@ -20,9 +23,23 @@ use serde::{Deserialize, Serialize};
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -11,16 +11,33 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppContactDelete, EppContactDeleteResponse}; /// use epp_client::epp::{EppContactDelete, EppContactDeleteResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -12,16 +12,33 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppContactInfo, EppContactInfoResponse}; /// use epp_client::epp::{EppContactInfo, EppContactInfoResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -14,16 +14,34 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppContactUpdate, EppContactUpdateResponse}; /// use epp_client::epp::{EppContactUpdate, EppContactUpdateResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// use epp_client::epp::object::data::ContactStatus;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -11,16 +11,33 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```rust /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppDomainCheck, EppDomainCheckResponse}; /// use epp_client::epp::{EppDomainCheck, EppDomainCheckResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -15,7 +15,10 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::object::data::DomainContact; /// use epp_client::epp::object::data::DomainContact;
/// use epp_client::epp::{EppDomainCreate, EppDomainCreateResponse}; /// use epp_client::epp::{EppDomainCreate, EppDomainCreateResponse};
@ -23,9 +26,23 @@ use serde::{Deserialize, Serialize};
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -11,16 +11,33 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppDomainDelete, EppDomainDeleteResponse}; /// use epp_client::epp::{EppDomainDelete, EppDomainDeleteResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -11,16 +11,33 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppDomainInfo, EppDomainInfoResponse}; /// use epp_client::epp::{EppDomainInfo, EppDomainInfoResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -13,17 +13,35 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use chrono::NaiveDate; /// use chrono::NaiveDate;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppDomainRenew, EppDomainRenewResponse}; /// use epp_client::epp::{EppDomainRenew, EppDomainRenewResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -16,7 +16,10 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppDomainRgpRestoreReport, EppDomainRgpRestoreReportResponse}; /// use epp_client::epp::{EppDomainRgpRestoreReport, EppDomainRgpRestoreReportResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
@ -25,9 +28,23 @@ use serde::{Deserialize, Serialize};
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -15,16 +15,33 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppDomainRgpRestoreRequest, EppDomainRgpRestoreRequestResponse}; /// use epp_client::epp::{EppDomainRgpRestoreRequest, EppDomainRgpRestoreRequestResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -12,16 +12,33 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppDomainTransferRequest, EppDomainTransferRequestResponse}; /// use epp_client::epp::{EppDomainTransferRequest, EppDomainTransferRequestResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };
@ -43,16 +60,33 @@ pub type EppDomainTransferRequest = EppObject<Command<DomainTransfer>>;
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppDomainTransferApprove, EppDomainTransferApproveResponse}; /// use epp_client::epp::{EppDomainTransferApprove, EppDomainTransferApproveResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };
@ -74,16 +108,33 @@ pub type EppDomainTransferApprove = EppObject<Command<DomainTransfer>>;
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppDomainTransferReject, EppDomainTransferRejectResponse}; /// use epp_client::epp::{EppDomainTransferReject, EppDomainTransferRejectResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };
@ -105,16 +156,33 @@ pub type EppDomainTransferReject = EppObject<Command<DomainTransfer>>;
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppDomainTransferCancel, EppDomainTransferCancelResponse}; /// use epp_client::epp::{EppDomainTransferCancel, EppDomainTransferCancelResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };
@ -136,16 +204,33 @@ pub type EppDomainTransferCancel = EppObject<Command<DomainTransfer>>;
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppDomainTransferQuery, EppDomainTransferQueryResponse}; /// use epp_client::epp::{EppDomainTransferQuery, EppDomainTransferQueryResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -13,7 +13,10 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::object::data::{DomainStatus, DomainContact}; /// use epp_client::epp::object::data::{DomainStatus, DomainContact};
/// use epp_client::epp::{EppDomainUpdate, EppDomainUpdateResponse, DomainAddRemove}; /// use epp_client::epp::{EppDomainUpdate, EppDomainUpdateResponse, DomainAddRemove};
@ -21,9 +24,23 @@ use serde::{Deserialize, Serialize};
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -11,16 +11,33 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```rust /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppHostCheck, EppHostCheckResponse}; /// use epp_client::epp::{EppHostCheck, EppHostCheckResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -12,7 +12,10 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::object::data::HostAddr; /// use epp_client::epp::object::data::HostAddr;
/// use epp_client::epp::{EppHostCreate, EppHostCreateResponse}; /// use epp_client::epp::{EppHostCreate, EppHostCreateResponse};
@ -20,9 +23,23 @@ use serde::{Deserialize, Serialize};
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -11,16 +11,33 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppHostDelete, EppHostDeleteResponse}; /// use epp_client::epp::{EppHostDelete, EppHostDeleteResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -11,16 +11,33 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppHostInfo, EppHostInfoResponse}; /// use epp_client::epp::{EppHostInfo, EppHostInfoResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -12,7 +12,10 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::object::StringValueTrait; /// use epp_client::epp::object::StringValueTrait;
/// use epp_client::epp::object::data::{HostAddr, HostStatus}; /// use epp_client::epp::object::data::{HostAddr, HostStatus};
@ -21,9 +24,23 @@ use serde::{Deserialize, Serialize};
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -9,16 +9,33 @@ use serde::{Deserialize, Serialize};
/// Type that represents the &lt;epp&gt; request for registry <poll op="ack"> command /// Type that represents the &lt;epp&gt; request for registry <poll op="ack"> command
/// ## Usage /// ## Usage
/// ///
/// ```ignore /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppMessageAck, EppMessageAckResponse}; /// use epp_client::epp::{EppMessageAck, EppMessageAckResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -10,16 +10,33 @@ use serde::{Deserialize, Serialize};
/// ///
/// ## Usage /// ## Usage
/// ///
/// ```rust /// ```no_run
/// use std::collections::HashMap;
///
/// use epp_client::config::{EppClientConfig, EppClientConnection};
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::epp::{EppMessagePoll, EppMessagePollResponse}; /// use epp_client::epp::{EppMessagePoll, EppMessagePollResponse};
/// use epp_client::epp::generate_client_tr_id; /// use epp_client::epp::generate_client_tr_id;
/// ///
/// #[tokio::main] /// #[tokio::main]
/// async fn main() { /// async fn main() {
/// // Create an instance of EppClient, specifying the name of the registry as in /// // Create a config
/// // the config file /// let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
/// let mut client = match EppClient::new("verisign").await { /// registry.insert(
/// "registry_name".to_owned(),
/// EppClientConnection {
/// host: "example.com".to_owned(),
/// port: 700,
/// username: "username".to_owned(),
/// password: "password".to_owned(),
/// ext_uris: None,
/// tls_files: None,
/// },
/// );
/// let config = EppClientConfig { registry };
///
/// // Create an instance of EppClient, passing the config and the registry you want to connect to
/// let mut client = match EppClient::new(&config, "registry_name").await {
/// Ok(client) => client, /// Ok(client) => client,
/// Err(e) => panic!("Failed to create EppClient: {}", e) /// Err(e) => panic!("Failed to create EppClient: {}", e)
/// }; /// };

View File

@ -33,45 +33,39 @@
//! - RGP Restore Request - [`EppDomainRgpRestoreRequest`](epp/request/domain/rgp/request/type.EppDomainRgpRestoreRequest.html) //! - RGP Restore Request - [`EppDomainRgpRestoreRequest`](epp/request/domain/rgp/request/type.EppDomainRgpRestoreRequest.html)
//! - RGP Restore Report - [`EppDomainRgpRestoreReport`](epp/request/domain/rgp/report/type.EppDomainRgpRestoreReport.html) //! - RGP Restore Report - [`EppDomainRgpRestoreReport`](epp/request/domain/rgp/report/type.EppDomainRgpRestoreReport.html)
//! //!
//! ## Prerequisites
//!
//! To use the library, you must have an `epp-client/epp-client.toml` config file with the relevant registry
//! credentials in your default user configuration directory on your OS. For Linux, this is the `XDG user directory`,
//! usually located at `$HOME/.config` or defined by the `XDG_CONFIG_HOME` environment variable.
//!
//! An example config looks like this:
//!
//! ```toml
//! [registry.verisign]
//! host = 'epp.verisign-grs.com'
//! port = 700
//! username = 'username'
//! password = 'password'
//! # service extensions
//! ext_uris = []
//!
//! [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
//! key = '/path/to/private/key/pemfile'
//! ```
//!
//! ## Operation //! ## Operation
//! //!
//! Once the config is set correctly, you can create a mut variable of type [`EppClient`] to transact //! Once the config is set correctly, you can create a mut variable of type [`EppClient`] to transact
//! with the domain registry //! with the domain registry
//! //!
//! ```rust //! ```no_run
//! use std::collections::HashMap;
//!
//! use epp_client::config::{EppClientConfig, EppClientConnection};
//! use epp_client::EppClient; //! use epp_client::EppClient;
//! use epp_client::epp::{EppDomainCheck, EppDomainCheckResponse}; //! use epp_client::epp::{EppDomainCheck, EppDomainCheckResponse};
//! use epp_client::epp::generate_client_tr_id; //! use epp_client::epp::generate_client_tr_id;
//! //!
//! #[tokio::main] //! #[tokio::main]
//! async fn main() { //! async fn main() {
//! // Create an instance of EppClient, specifying the name of the registry as in //!
//! // the config file //! // Create a config
//! let mut client = match EppClient::new("verisign").await { //! let mut registry: HashMap<String, EppClientConnection> = HashMap::new();
//! registry.insert(
//! "registry_name".to_owned(),
//! EppClientConnection {
//! host: "example.com".to_owned(),
//! port: 700,
//! username: "username".to_owned(),
//! password: "password".to_owned(),
//! ext_uris: None,
//! tls_files: None,
//! },
//! );
//! let config = EppClientConfig { registry };
//!
//! // Create an instance of EppClient, passing the config and the registry you want to connect to
//! let mut client = match EppClient::new(&config, "registry_name").await {
//! Ok(client) => client, //! Ok(client) => client,
//! Err(e) => panic!("Failed to create EppClient: {}", e) //! Err(e) => panic!("Failed to create EppClient: {}", e)
//! }; //! };
@ -89,12 +83,13 @@
//! response.data.res_data.unwrap().check_data.domain_list //! response.data.res_data.unwrap().check_data.domain_list
//! .iter() //! .iter()
//! .for_each(|chk| println!("Domain: {}, Available: {}", chk.domain.name, chk.domain.available)); //! .for_each(|chk| println!("Domain: {}, Available: {}", chk.domain.name, chk.domain.available));
//!
//! } //! }
//! ``` //! ```
//! //!
//! The output would look similar to the following //! The output would look similar to the following
//! //!
//! ``` //! ```text
//! Domain: eppdev.com, Available: 1 //! Domain: eppdev.com, Available: 1
//! Domain: eppdev.net, Available: 1 //! Domain: eppdev.net, Available: 1
//! ``` //! ```