pub struct LengthPrefixedVec<'a, P, T>(pub Cow<'a, [T]>, _)
where
[T]: ToOwned<Owned = Vec<T>>;Expand description
Reads and writes an array of inner Writeables.
The array is prefixed with a VarInt length.
This will reject arrays of lengths larger than MAX_LENGTH.
Tuple Fields§
§0: Cow<'a, [T]>Trait Implementations§
Source§impl<'a, P, T> Decoder for LengthPrefixedVec<'a, P, T>
impl<'a, P, T> Decoder for LengthPrefixedVec<'a, P, T>
Source§impl<'a, P, T> Encoder for LengthPrefixedVec<'a, P, T>
impl<'a, P, T> Encoder for LengthPrefixedVec<'a, P, T>
Source§impl<'a, P, T> From<&'a [T]> for LengthPrefixedVec<'a, P, T>
impl<'a, P, T> From<&'a [T]> for LengthPrefixedVec<'a, P, T>
Source§impl<'a, P, T> From<LengthPrefixedVec<'a, P, T>> for Vec<T>
impl<'a, P, T> From<LengthPrefixedVec<'a, P, T>> for Vec<T>
Source§fn from(x: LengthPrefixedVec<'a, P, T>) -> Self
fn from(x: LengthPrefixedVec<'a, P, T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a, P, T> Freeze for LengthPrefixedVec<'a, P, T>
impl<'a, P, T> RefUnwindSafe for LengthPrefixedVec<'a, P, T>where
P: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, P, T> Send for LengthPrefixedVec<'a, P, T>
impl<'a, P, T> Sync for LengthPrefixedVec<'a, P, T>
impl<'a, P, T> Unpin for LengthPrefixedVec<'a, P, T>
impl<'a, P, T> UnwindSafe for LengthPrefixedVec<'a, P, T>
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