Expand description
A newtype wrapping Vec<T>
but with a custom length prefix type.
Fields
elements: Vec<T>
The inner Vec<T>
.
Implementations
Trait Implementations
sourceimpl<S: Integer, T: Parcel> Parcel for Vec<S, T>
impl<S: Integer, T: Parcel> Parcel for Vec<S, T>
sourcefn read_field(
read: &mut dyn Read,
settings: &Settings,
hints: &mut Hints
) -> Result<Self, Error>
fn read_field(
read: &mut dyn Read,
settings: &Settings,
hints: &mut Hints
) -> Result<Self, Error>
Reads a value from a stream. Read more
sourcefn write_field(
&self,
write: &mut dyn Write,
settings: &Settings,
hints: &mut Hints
) -> Result<(), Error>
fn write_field(
&self,
write: &mut dyn Write,
settings: &Settings,
hints: &mut Hints
) -> Result<(), Error>
Writes a value to a stream.
sourcefn read(read: &mut dyn Read, settings: &Settings) -> Result<Self, Error>
fn read(read: &mut dyn Read, settings: &Settings) -> Result<Self, Error>
Reads a new item with a fresh set of hints. Read more
sourcefn write(&self, write: &mut dyn Write, settings: &Settings) -> Result<(), Error>
fn write(&self, write: &mut dyn Write, settings: &Settings) -> Result<(), Error>
Writes a value to a stream.
sourcefn into_stream(self, settings: &Settings) -> Result<Cursor<Vec<u8>>, Error>
fn into_stream(self, settings: &Settings) -> Result<Cursor<Vec<u8>>, Error>
Convers the value into a byte stream that implements std::io::Read
.
sourcefn from_raw_bytes(bytes: &[u8], settings: &Settings) -> Result<Self, Error>
fn from_raw_bytes(bytes: &[u8], settings: &Settings) -> Result<Self, Error>
Parses a new value from its raw byte representation. Read more
sourcefn field_from_raw_bytes(
bytes: &[u8],
settings: &Settings,
hints: &mut Hints
) -> Result<Self, Error>
fn field_from_raw_bytes(
bytes: &[u8],
settings: &Settings,
hints: &mut Hints
) -> Result<Self, Error>
Parses a new value from its raw byte representation. Read more
sourcefn raw_bytes(&self, settings: &Settings) -> Result<Vec<u8>, Error>
fn raw_bytes(&self, settings: &Settings) -> Result<Vec<u8>, Error>
Gets the raw byte representation of the value.
sourceimpl<S: PartialEq + Integer, T: PartialEq + Parcel> PartialEq<Vec<S, T>> for Vec<S, T>
impl<S: PartialEq + Integer, T: PartialEq + Parcel> PartialEq<Vec<S, T>> for Vec<S, T>
impl<S: Integer, T: Parcel> StructuralPartialEq for Vec<S, T>
Auto Trait Implementations
impl<S, T> RefUnwindSafe for Vec<S, T> where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<S, T> Send for Vec<S, T> where
S: Send,
T: Send,
impl<S, T> Sync for Vec<S, T> where
S: Sync,
T: Sync,
impl<S, T> Unpin for Vec<S, T> where
S: Unpin,
T: Unpin,
impl<S, T> UnwindSafe for Vec<S, T> where
S: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more