diff --git a/scylla/src/transport/caching_session.rs b/scylla/src/transport/caching_session.rs index 77668b28c..debf0def6 100644 --- a/scylla/src/transport/caching_session.rs +++ b/scylla/src/transport/caching_session.rs @@ -16,6 +16,7 @@ use scylla_cql::frame::response::result::{PreparedMetadata, ResultMetadata}; use scylla_cql::types::serialize::batch::BatchValues; use scylla_cql::types::serialize::row::SerializeRow; use std::collections::hash_map::RandomState; +use std::fmt; use std::hash::BuildHasher; use std::sync::Arc; @@ -39,7 +40,6 @@ struct RawPreparedStatementData { } /// Provides auto caching while executing queries -#[derive(Debug)] pub struct GenericCachingSession where S: Clone + BuildHasher, @@ -53,6 +53,20 @@ where cache: DashMap, } +impl fmt::Debug for GenericCachingSession +where + S: Clone + BuildHasher, + DeserializationApi: DeserializationApiKind, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("GenericCachingSession") + .field("session", &self.session) + .field("max_capacity", &self.max_capacity) + .field("cache", &self.cache) + .finish() + } +} + pub type CachingSession = GenericCachingSession; #[deprecated(