pub struct TcFrameReader<const BUF: usize> { /* private fields */ }Expand description
Extracts packets from a received TC transfer frame.
Owns its frame buffer internally (sized by BUF). The
coding layer writes into
buffer_mut(),
feed() validates the header, and
next() returns zero-copy sub-slices.
Implementations§
Trait Implementations§
Source§impl<const BUF: usize> FrameRead for TcFrameReader<BUF>
impl<const BUF: usize> FrameRead for TcFrameReader<BUF>
Source§type Error = ParseError
type Error = ParseError
Error type for frame parsing.
Source§fn buffer_mut(&mut self) -> &mut [u8] ⓘ
fn buffer_mut(&mut self) -> &mut [u8] ⓘ
Returns a mutable reference to the internal buffer
for the coding layer to write received data into.
Auto Trait Implementations§
impl<const BUF: usize> Freeze for TcFrameReader<BUF>
impl<const BUF: usize> RefUnwindSafe for TcFrameReader<BUF>
impl<const BUF: usize> Send for TcFrameReader<BUF>
impl<const BUF: usize> Sync for TcFrameReader<BUF>
impl<const BUF: usize> Unpin for TcFrameReader<BUF>
impl<const BUF: usize> UnsafeUnpin for TcFrameReader<BUF>
impl<const BUF: usize> UnwindSafe for TcFrameReader<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