pub struct Decoder { /* private fields */ }Implementations§
Source§impl Decoder
impl Decoder
pub fn new() -> Self
Sourcepub fn feed(&mut self, bytes: &[u8]) -> usize
pub fn feed(&mut self, bytes: &[u8]) -> usize
Add as many bytes as fit, returning how many were added. Take events with
Decoder::next_event to make room for more.
Sourcepub fn next_event(&mut self) -> Option<Event>
pub fn next_event(&mut self) -> Option<Event>
Decode the next event, or return None if more bytes are needed.
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