@@ -71,7 +71,10 @@ pub struct GenericSessionBuilder<Kind: SessionBuilderKind> {
71
71
kind : PhantomData < Kind > ,
72
72
}
73
73
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 > {
75
78
/// Creates new SessionBuilder with default configuration
76
79
/// # Default configuration
77
80
/// * Compression: None
@@ -332,6 +335,10 @@ impl SessionBuilder {
332
335
self
333
336
}
334
337
}
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.
335
342
#[ cfg( feature = "cloud" ) ]
336
343
impl CloudSessionBuilder {
337
344
/// Creates a new SessionBuilder with default configuration,
@@ -356,6 +363,8 @@ impl CloudSessionBuilder {
356
363
}
357
364
}
358
365
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.
359
368
impl < K : SessionBuilderKind > GenericSessionBuilder < K > {
360
369
/// Set preferred Compression algorithm.
361
370
/// The default is no compression.
0 commit comments