@@ -71,7 +71,10 @@ pub struct GenericSessionBuilder<Kind: SessionBuilderKind> {
7171 kind : PhantomData < Kind > ,
7272}
7373
74- impl SessionBuilder {
74+ // NOTE: this `impl` block contains configuration options specific for **non-Cloud** [`Session`].
75+ // This means that if an option fits both non-Cloud and Cloud `Session`s, it should NOT be put
76+ // here, but rather in `impl<K> GenericSessionBuilder<K>` block.
77+ impl GenericSessionBuilder < DefaultMode > {
7578 /// Creates new SessionBuilder with default configuration
7679 /// # Default configuration
7780 /// * Compression: None
@@ -332,6 +335,10 @@ impl SessionBuilder {
332335 self
333336 }
334337}
338+
339+ // NOTE: this `impl` block contains configuration options specific for **Cloud** [`Session`].
340+ // This means that if an option fits both non-Cloud and Cloud `Session`s, it should NOT be put
341+ // here, but rather in `impl<K> GenericSessionBuilder<K>` block.
335342#[ cfg( feature = "cloud" ) ]
336343impl CloudSessionBuilder {
337344 /// Creates a new SessionBuilder with default configuration,
@@ -356,6 +363,8 @@ impl CloudSessionBuilder {
356363 }
357364}
358365
366+ // This block contains configuration options that make sense both for Cloud and non-Cloud
367+ // `Session`s. If an option fit only one of them, it should be put in a specialised block.
359368impl < K : SessionBuilderKind > GenericSessionBuilder < K > {
360369 /// Set preferred Compression algorithm.
361370 /// The default is no compression.
0 commit comments