pub struct FramePicker<const N: usize, M: FrameMeta> {
pub dropped: usize,
/* private fields */
}
Expand description
A struct for storing and handling network frame data
Fields§
§dropped: usize
The number of bytes dropped
Implementations§
Source§impl<const N: usize, M: FrameMeta> FramePicker<N, M>
impl<const N: usize, M: FrameMeta> FramePicker<N, M>
Sourcepub fn feed_data(&mut self, data: &[u8]) -> Result<usize, Full>
pub fn feed_data(&mut self, data: &[u8]) -> Result<usize, Full>
Feeds data into the FramePicker Returns a Full error if the storage is full
Sourcepub fn contain_frame(&self) -> bool
pub fn contain_frame(&self) -> bool
Checks if the FramePicker contains a frame
Sourcepub fn frame_complete(&self) -> bool
pub fn frame_complete(&self) -> bool
Checks if the frame is complete
Sourcepub fn acquire_frame(&mut self) -> Result<&[u8], Empty>
pub fn acquire_frame(&mut self) -> Result<&[u8], Empty>
Acquires a frame
Sourcepub fn release_frame(&mut self) -> Result<(), Empty>
pub fn release_frame(&mut self) -> Result<(), Empty>
Releases a frame
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize, M> Freeze for FramePicker<N, M>
impl<const N: usize, M> RefUnwindSafe for FramePicker<N, M>where
M: RefUnwindSafe,
impl<const N: usize, M> Send for FramePicker<N, M>where
M: Send,
impl<const N: usize, M> Sync for FramePicker<N, M>where
M: Sync,
impl<const N: usize, M> Unpin for FramePicker<N, M>where
M: Unpin,
impl<const N: usize, M> UnwindSafe for FramePicker<N, M>where
M: 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