pub struct Decoder<B: AsRef<[u8]> + AsMut<[u8]>> { /* private fields */ }Implementations§
Source§impl<B: AsRef<[u8]> + AsMut<[u8]>> Decoder<B>
impl<B: AsRef<[u8]> + AsMut<[u8]>> Decoder<B>
pub fn new(buffer: B) -> Result<Self, Error>
pub fn reset(&mut self)
pub fn count(&self) -> usize
pub fn invalid_count(&self) -> usize
pub fn swap_buffer(&mut self, new_buffer: B) -> Result<B, Error>
pub fn decode_frameless(&mut self, byte: u8) -> Result<Option<usize>, Error>
pub fn decode(&mut self, byte: u8) -> Result<Option<Frame<&[u8]>>, Error>
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for Decoder<B>where
B: Freeze,
impl<B> RefUnwindSafe for Decoder<B>where
B: RefUnwindSafe,
impl<B> Send for Decoder<B>where
B: Send,
impl<B> Sync for Decoder<B>where
B: Sync,
impl<B> Unpin for Decoder<B>where
B: Unpin,
impl<B> UnwindSafe for Decoder<B>where
B: UnwindSafe,
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