pub struct ReadState<'buf> {
pub index: usize,
pub eof: bool,
pub is_framable: bool,
pub shift: bool,
pub total_consumed: usize,
pub buffer: &'buf mut [u8],
}Expand description
Internal state for reading frames.
Fields§
§index: usizeThe current index in the buffer.
Represents the number of bytes read into the buffer.
eof: boolEOF was reached while decoding.
is_framable: boolThe buffer is currently framable.
shift: boolThe buffer must be shifted before reading more bytes.
Makes room for more bytes to be read into the buffer, keeping the already read bytes.
total_consumed: usizeTotal number of bytes decoded in a framing round.
buffer: &'buf mut [u8]The underlying buffer to read into.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'buf> !UnwindSafe for ReadState<'buf>
impl<'buf> Freeze for ReadState<'buf>
impl<'buf> RefUnwindSafe for ReadState<'buf>
impl<'buf> Send for ReadState<'buf>
impl<'buf> Sync for ReadState<'buf>
impl<'buf> Unpin for ReadState<'buf>
impl<'buf> UnsafeUnpin for ReadState<'buf>
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