From ac5067907147294c8e47296a5b7b500537275a05 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 1 Dec 2021 14:21:43 +0100 Subject: [PATCH] Hoist client and registry modules up to top level --- epp-client/src/{connection => }/client.rs | 3 ++- epp-client/src/connection.rs | 5 ----- epp-client/src/lib.rs | 7 ++++--- epp-client/src/{connection => }/registry.rs | 0 4 files changed, 6 insertions(+), 9 deletions(-) rename epp-client/src/{connection => }/client.rs (99%) delete mode 100644 epp-client/src/connection.rs rename epp-client/src/{connection => }/registry.rs (100%) diff --git a/epp-client/src/connection/client.rs b/epp-client/src/client.rs similarity index 99% rename from epp-client/src/connection/client.rs rename to epp-client/src/client.rs index 052b17d..8fd7d88 100644 --- a/epp-client/src/connection/client.rs +++ b/epp-client/src/client.rs @@ -52,14 +52,15 @@ use std::{error::Error, fmt::Debug}; use crate::common::{EppObject, NoExtension}; use crate::config::EppClientConfig; -use crate::connection::registry::{epp_connect, EppConnection}; use crate::error; use crate::hello::{Greeting, Hello}; use crate::login::Login; use crate::logout::Logout; +use crate::registry::{epp_connect, EppConnection}; use crate::request::{generate_client_tr_id, EppExtension, EppRequest}; use crate::response::{CommandResponseStatus, CommandResponseWithExtension}; use crate::xml::EppXml; + /// 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 diff --git a/epp-client/src/connection.rs b/epp-client/src/connection.rs deleted file mode 100644 index 2ee1e73..0000000 --- a/epp-client/src/connection.rs +++ /dev/null @@ -1,5 +0,0 @@ -//! Manages registry connections and reading/writing to them -//! and connects the EppClient instances to them - -pub mod client; -pub mod registry; diff --git a/epp-client/src/lib.rs b/epp-client/src/lib.rs index 9ef6619..4295cd3 100644 --- a/epp-client/src/lib.rs +++ b/epp-client/src/lib.rs @@ -100,9 +100,9 @@ #[macro_use] extern crate log; +pub mod client; pub mod common; pub mod config; -pub mod connection; pub mod contact; pub mod domain; pub mod error; @@ -111,12 +111,13 @@ pub mod host; pub mod login; pub mod logout; pub mod message; +pub mod registry; pub mod request; pub mod response; pub mod xml; -pub use connection::client::EppClient; -pub use crate::connection::client::default_client_tr_id_fn as generate_client_tr_id; +pub use client::default_client_tr_id_fn as generate_client_tr_id; +pub use client::EppClient; #[cfg(test)] pub mod tests; diff --git a/epp-client/src/connection/registry.rs b/epp-client/src/registry.rs similarity index 100% rename from epp-client/src/connection/registry.rs rename to epp-client/src/registry.rs