pub struct Encoder { /* private fields */ }Expand description
Writes one message: the msgpack buffer plus out-of-band frames.
Implementations§
Source§impl Encoder
impl Encoder
Sourcepub fn with_inline_threshold(inline_threshold: usize) -> Self
pub fn with_inline_threshold(inline_threshold: usize) -> Self
An encoder that frames out buffers of at least inline_threshold bytes.
Sourcepub fn into_frames(self) -> Vec<Bytes>
pub fn into_frames(self) -> Vec<Bytes>
Finish the message: the msgpack buffer, then the out-of-band frames.
Sourcepub fn into_single_frame(self) -> Vec<u8> ⓘ
pub fn into_single_frame(self) -> Vec<u8> ⓘ
Finish a message that has no out-of-band frames.
§Panics
If a buffer was framed out: the caller would drop it from the wire.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Encoder
impl RefUnwindSafe for Encoder
impl Send for Encoder
impl Sync for Encoder
impl Unpin for Encoder
impl UnsafeUnpin for Encoder
impl UnwindSafe for Encoder
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