Struct DecodedFrames
pub struct DecodedFrames<T> {
pub messages: Vec<T>,
pub skipped: usize,
pub remainder: Vec<u8>,
}Expand description
Result of decoding a buffer that may hold several frames.
Fields§
§messages: Vec<T>Successfully decoded messages, in wire order.
skipped: usizeCount of complete but undecodable frames that were skipped - an unknown data-carrying message from a newer minor version, or a corrupt body. Skipping is safe because each frame is length-delimited.
remainder: Vec<u8>Unconsumed trailing bytes (a partial final frame) to prepend to the next read; reuses the input buffer’s allocation.
Trait Implementations§
§impl<T: Clone> Clone for DecodedFrames<T>
impl<T: Clone> Clone for DecodedFrames<T>
§fn clone(&self) -> DecodedFrames<T>
fn clone(&self) -> DecodedFrames<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl<T: Debug> Debug for DecodedFrames<T>
impl<T: Debug> Debug for DecodedFrames<T>
§impl<T: PartialEq> PartialEq for DecodedFrames<T>
impl<T: PartialEq> PartialEq for DecodedFrames<T>
impl<T: PartialEq> StructuralPartialEq for DecodedFrames<T>
Auto Trait Implementations§
impl<T> Freeze for DecodedFrames<T>
impl<T> RefUnwindSafe for DecodedFrames<T>where
T: RefUnwindSafe,
impl<T> Send for DecodedFrames<T>where
T: Send,
impl<T> Sync for DecodedFrames<T>where
T: Sync,
impl<T> Unpin for DecodedFrames<T>where
T: Unpin,
impl<T> UnsafeUnpin for DecodedFrames<T>
impl<T> UnwindSafe for DecodedFrames<T>where
T: 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