pub struct FrameDecoder { /* private fields */ }Expand description
Splits a stream, given as it comes, into frames. A header that isn’t one is an error for its frame alone; one too long to hold ends the stream, which can’t be split past it.
Implementations§
Source§impl FrameDecoder
impl FrameDecoder
pub fn push(&mut self, bytes: &[u8])
Sourcepub fn next_frame<H: DeserializeOwned>(
&mut self,
) -> Option<Result<Frame<H>, FrameError>>
pub fn next_frame<H: DeserializeOwned>( &mut self, ) -> Option<Result<Frame<H>, FrameError>>
The next whole frame, if it has come.
Trait Implementations§
Source§impl Debug for FrameDecoder
impl Debug for FrameDecoder
Auto Trait Implementations§
impl Forget for FrameDecoder
impl Freeze for FrameDecoder
impl Move for FrameDecoder
impl RefUnwindSafe for FrameDecoder
impl Send for FrameDecoderwhere
RawVecInner: Send,
impl Sync for FrameDecoderwhere
RawVecInner: Sync,
impl Unpin for FrameDecoder
impl UnsafeUnpin for FrameDecoder
impl UnwindSafe for FrameDecoderwhere
RawVecInner: 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