diff --git a/common/bandwidth-controller/src/lib.rs b/common/bandwidth-controller/src/lib.rs index 33f9428e44..c7aed707f9 100644 --- a/common/bandwidth-controller/src/lib.rs +++ b/common/bandwidth-controller/src/lib.rs @@ -18,6 +18,7 @@ pub mod acquire; pub mod error; mod utils; +#[derive(Debug)] pub struct BandwidthController { storage: St, client: C, diff --git a/common/client-libs/gateway-client/src/client.rs b/common/client-libs/gateway-client/src/client.rs index 4d14d30fc2..633832889e 100644 --- a/common/client-libs/gateway-client/src/client.rs +++ b/common/client-libs/gateway-client/src/client.rs @@ -79,6 +79,7 @@ impl GatewayConfig { } // TODO: this should be refactored into a state machine that keeps track of its authentication state +#[derive(Debug)] pub struct GatewayClient { authenticated: bool, disabled_credentials_mode: bool, @@ -849,6 +850,7 @@ impl GatewayClient { // type alias for an ease of use pub type InitGatewayClient = GatewayClient; +#[derive(Debug)] pub struct InitOnly; impl GatewayClient { diff --git a/common/client-libs/gateway-client/src/socket_state.rs b/common/client-libs/gateway-client/src/socket_state.rs index 44396a9dd3..328356ac30 100644 --- a/common/client-libs/gateway-client/src/socket_state.rs +++ b/common/client-libs/gateway-client/src/socket_state.rs @@ -48,6 +48,7 @@ pub(crate) fn ws_fd(_conn: &WsConn) -> Option { None } +#[derive(Debug)] pub(crate) struct PartiallyDelegated { sink_half: SplitSink, delegated_stream: (SplitStreamReceiver, oneshot::Sender<()>), @@ -221,6 +222,7 @@ impl PartiallyDelegated { // we can either have the stream itself or an option to re-obtain it // by notifying the future owning it to finish the execution and awaiting the result // which should be almost immediate (or an invalid state which should never, ever happen) +#[derive(Debug)] pub(crate) enum SocketState { Available(Box), PartiallyDelegated(PartiallyDelegated), diff --git a/common/credential-storage/src/ephemeral_storage.rs b/common/credential-storage/src/ephemeral_storage.rs index 97d456ea46..ead11edcf8 100644 --- a/common/credential-storage/src/ephemeral_storage.rs +++ b/common/credential-storage/src/ephemeral_storage.rs @@ -1,6 +1,8 @@ // Copyright 2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +use std::fmt::{self, Debug, Formatter}; + use crate::backends::memory::CoconutCredentialManager; use crate::error::StorageError; use crate::models::{StorableIssuedCredential, StoredIssuedCredential}; @@ -23,6 +25,12 @@ impl Default for EphemeralStorage { } } +impl Debug for EphemeralStorage { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + write!(f, "EphemeralStorage") + } +} + #[async_trait] impl Storage for EphemeralStorage { type StorageError = StorageError; diff --git a/common/wasm/utils/src/websocket/mod.rs b/common/wasm/utils/src/websocket/mod.rs index 5978f0940d..be95a8bf12 100644 --- a/common/wasm/utils/src/websocket/mod.rs +++ b/common/wasm/utils/src/websocket/mod.rs @@ -6,6 +6,7 @@ use futures::{Sink, Stream}; use gloo_net::websocket::futures::WebSocket; use gloo_net::websocket::{Message, WebSocketError}; use gloo_utils::errors::JsError; +use std::fmt::{self, Formatter}; use std::io; use std::pin::Pin; use std::task::{Context, Poll}; @@ -77,6 +78,12 @@ impl Stream for JSWebsocket { } } +impl fmt::Debug for JSWebsocket { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + write!(f, "JSWebSocket") + } +} + impl Sink for JSWebsocket { type Error = WsError;