pub struct PayloadVector { /* private fields */ }Expand description
Owning variant of PayloadSlice, in which the underlying bytes are fully
in memory within the struct. This is useful mainly for building the structure
before writing it to a file, but also if one decides to fully load the bytes
to memory and use it to assess elements without parsing the whole vector
to a Vec.
PayloadVector implements Deref<Target = PayloadSlice>. See PayloadSlice
for all the methods supported through dereferencing.
Methods from Deref<Target = PayloadSlice>§
Sourcepub fn write<W: Write>(&self, writer: &mut W) -> Result<()>
pub fn write<W: Write>(&self, writer: &mut W) -> Result<()>
Writes the underlying memory to the output.
§Errors
Will return an error if an error occurs while writing to the output.
Trait Implementations§
Source§impl AsRef<[u8]> for PayloadVector
impl AsRef<[u8]> for PayloadVector
Source§impl AsRef<PayloadSlice> for PayloadVector
impl AsRef<PayloadSlice> for PayloadVector
Source§fn as_ref(&self) -> &PayloadSlice
fn as_ref(&self) -> &PayloadSlice
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for PayloadVector
impl Clone for PayloadVector
Source§fn clone(&self) -> PayloadVector
fn clone(&self) -> PayloadVector
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PayloadVector
impl Debug for PayloadVector
Source§impl Deref for PayloadVector
impl Deref for PayloadVector
Source§impl<Item> FromIterator<Item> for PayloadVector
impl<Item> FromIterator<Item> for PayloadVector
Source§fn from_iter<T: IntoIterator<Item = Item>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Item>>(iter: T) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations§
impl Freeze for PayloadVector
impl RefUnwindSafe for PayloadVector
impl Send for PayloadVector
impl Sync for PayloadVector
impl Unpin for PayloadVector
impl UnwindSafe for PayloadVector
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