pub struct Decoder { /* private fields */ }Expand description
Streaming frame decoder. Feed it bytes as they arrive.
Implementations§
Source§impl Decoder
impl Decoder
pub const fn new() -> Self
pub fn push(&mut self, byte: u8) -> Option<Decoded>
Sourcepub fn flush(&mut self) -> Option<Decoded>
pub fn flush(&mut self) -> Option<Decoded>
Return any buffered bytes as Decoded::Raw. Call this when the
input has been idle for a while, so plain text that isn’t followed by
a frame delimiter still gets delivered.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Decoder
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl Sync for Decoder
impl Unpin for Decoder
impl UnsafeUnpin for Decoder
impl UnwindSafe for Decoder
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