#[non_exhaustive]pub struct ProducerConfig {
pub compression: bool,
}Expand description
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.compression: boolCompress the group as one sync-flushed DEFLATE stream, so each record reuses the earlier ones as context and shrinks sharply.
false (the default) writes plaintext JSON frames. A Consumer reading the track must
set ConsumerConfig::compression to match.
Implementations§
Source§impl ProducerConfig
impl ProducerConfig
Sourcepub fn with_compression(self, compression: bool) -> Self
pub fn with_compression(self, compression: bool) -> Self
Set compression (a builder, since the struct is #[non_exhaustive]).
Trait Implementations§
Source§impl Clone for ProducerConfig
impl Clone for ProducerConfig
Source§fn clone(&self) -> ProducerConfig
fn clone(&self) -> ProducerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProducerConfig
impl Debug for ProducerConfig
Source§impl Default for ProducerConfig
impl Default for ProducerConfig
Source§fn default() -> ProducerConfig
fn default() -> ProducerConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProducerConfig
impl RefUnwindSafe for ProducerConfig
impl Send for ProducerConfig
impl Sync for ProducerConfig
impl Unpin for ProducerConfig
impl UnsafeUnpin for ProducerConfig
impl UnwindSafe for ProducerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more