Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion scylla/src/transport/session_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ pub struct GenericSessionBuilder<Kind: SessionBuilderKind> {
kind: PhantomData<Kind>,
}

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<K> GenericSessionBuilder<K>` block.
impl GenericSessionBuilder<DefaultMode> {
/// Creates new SessionBuilder with default configuration
/// # Default configuration
/// * Compression: None
Expand Down Expand Up @@ -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<K> GenericSessionBuilder<K>` block.
#[cfg(feature = "cloud")]
impl CloudSessionBuilder {
/// Creates a new SessionBuilder with default configuration,
Expand All @@ -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<K: SessionBuilderKind> GenericSessionBuilder<K> {
/// Set preferred Compression algorithm.
/// The default is no compression.
Expand Down