pub struct Prefixed<P, D> { /* private fields */ }Expand description
A wrapper type that adds a size prefix to the data it contains.
Implementations§
Trait Implementations§
Source§impl<P, T> FromLeStream for Prefixed<P, Box<[T]>>
impl<P, T> FromLeStream for Prefixed<P, Box<[T]>>
Source§fn from_le_stream<I>(bytes: I) -> Option<Self>
fn from_le_stream<I>(bytes: I) -> Option<Self>
Parse an object from a stream of bytes with little endianness. Read more
Source§fn from_le_stream_exact<T>(bytes: T) -> Result<Self>
fn from_le_stream_exact<T>(bytes: T) -> Result<Self>
Parse an object from a stream of bytes with little endianness
that contains exactly the bytes to construct
Self. Read moreSource§impl<P: Ord, D: Ord> Ord for Prefixed<P, D>
impl<P: Ord, D: Ord> Ord for Prefixed<P, D>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<P: PartialOrd, D: PartialOrd> PartialOrd for Prefixed<P, D>
impl<P: PartialOrd, D: PartialOrd> PartialOrd for Prefixed<P, D>
Source§impl<P, T> ToLeStream for Prefixed<P, Box<[T]>>
impl<P, T> ToLeStream for Prefixed<P, Box<[T]>>
Source§type Iter = Chain<<P as ToLeStream>::Iter, <Vec<T> as ToLeStream>::Iter>
type Iter = Chain<<P as ToLeStream>::Iter, <Vec<T> as ToLeStream>::Iter>
The byte iterator type.
Source§fn to_le_stream(self) -> Self::Iter
fn to_le_stream(self) -> Self::Iter
Return an iterator of bytes with little endianness.
impl<P: Eq, D: Eq> Eq for Prefixed<P, D>
impl<P, D> StructuralPartialEq for Prefixed<P, D>
Auto Trait Implementations§
impl<P, D> Freeze for Prefixed<P, D>where
D: Freeze,
impl<P, D> RefUnwindSafe for Prefixed<P, D>where
D: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, D> Send for Prefixed<P, D>
impl<P, D> Sync for Prefixed<P, D>
impl<P, D> Unpin for Prefixed<P, D>
impl<P, D> UnsafeUnpin for Prefixed<P, D>where
D: UnsafeUnpin,
impl<P, D> UnwindSafe for Prefixed<P, D>where
D: UnwindSafe,
P: 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