pub struct MessageSerializer { /* private fields */ }
Expand description
Message serializer with format detection
Implementations§
Source§impl MessageSerializer
impl MessageSerializer
Sourcepub const fn with_format(self, format: SerializationFormat) -> Self
pub const fn with_format(self, format: SerializationFormat) -> Self
Set the default serialization format
Sourcepub const fn with_compression(self, enable: bool, threshold: usize) -> Self
pub const fn with_compression(self, enable: bool, threshold: usize) -> Self
Enable compression for messages above threshold
Trait Implementations§
Source§impl Debug for MessageSerializer
impl Debug for MessageSerializer
Auto Trait Implementations§
impl Freeze for MessageSerializer
impl RefUnwindSafe for MessageSerializer
impl Send for MessageSerializer
impl Sync for MessageSerializer
impl Unpin for MessageSerializer
impl UnwindSafe for MessageSerializer
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