diff --git a/src/connection_builder.rs b/src/connection_builder.rs index e0f8a989..54dc5048 100644 --- a/src/connection_builder.rs +++ b/src/connection_builder.rs @@ -6,6 +6,7 @@ use crate::{ use async_rs::{Runtime, traits::*}; use std::io; +#[derive(Debug)] pub struct ConnectionBuilder { runtime: Runtime, uri: UriBuilder, @@ -14,7 +15,7 @@ pub struct ConnectionBuilder { } pub type DefaultConnectionBuilder = ConnectionBuilder; -#[derive(Clone, Default)] +#[derive(Debug, Clone, Default)] enum UriBuilder { Str(String), Uri(AMQPUri), diff --git a/src/connection_properties.rs b/src/connection_properties.rs index fba36485..09173b1e 100644 --- a/src/connection_properties.rs +++ b/src/connection_properties.rs @@ -3,6 +3,7 @@ use crate::{ types::{AMQPValue, FieldTable, LongString, ShortString}, }; use backon::ExponentialBuilder; +use std::fmt; use std::sync::Arc; #[derive(Clone)] @@ -69,3 +70,14 @@ impl ConnectionProperties { self } } + +impl fmt::Debug for ConnectionProperties { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("ConnectionProperties") + .field("locale", &self.locale) + .field("client_properties", &self.client_properties) + .field("backoff", &self.backoff) + .field("auto_recover", &self.auto_recover) + .finish() + } +}