diff --git a/scylla/src/transport/session_builder.rs b/scylla/src/transport/session_builder.rs index 246292ff96..8804e10e9b 100644 --- a/scylla/src/transport/session_builder.rs +++ b/scylla/src/transport/session_builder.rs @@ -71,7 +71,10 @@ pub struct GenericSessionBuilder { kind: PhantomData, } -impl SessionBuilder { +// NOTE: this `impl` block contains configuration options specific for **non-Cloud** [`Session`]. +// This means that if an option fits both non-Cloud and Cloud `Session`s, it should NOT be put +// here, but rather in `impl GenericSessionBuilder` block. +impl GenericSessionBuilder { /// Creates new SessionBuilder with default configuration /// # Default configuration /// * Compression: None @@ -332,6 +335,10 @@ impl SessionBuilder { self } } + +// NOTE: this `impl` block contains configuration options specific for **Cloud** [`Session`]. +// This means that if an option fits both non-Cloud and Cloud `Session`s, it should NOT be put +// here, but rather in `impl GenericSessionBuilder` block. #[cfg(feature = "cloud")] impl CloudSessionBuilder { /// Creates a new SessionBuilder with default configuration, @@ -356,6 +363,8 @@ impl CloudSessionBuilder { } } +// This block contains configuration options that make sense both for Cloud and non-Cloud +// `Session`s. If an option fit only one of them, it should be put in a specialised block. impl GenericSessionBuilder { /// Set preferred Compression algorithm. /// The default is no compression.