Struct StdVec

Source
pub struct StdVec(pub Vec<u8>);
Expand description

The StdVec flavor is a wrapper type around a std::vec::Vec.

This type is only available when the (non-default) use-std feature is active

Tuple Fields§

§0: Vec<u8>

Trait Implementations§

Source§

impl Index<usize> for StdVec

Source§

type Output = u8

The returned type after indexing.
Source§

fn index(&self, idx: usize) -> &u8

Performs the indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for StdVec

Source§

fn index_mut(&mut self, idx: usize) -> &mut u8

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl SerFlavor for StdVec

Source§

type Output = Vec<u8>

The Output type is what this flavor “resolves” to when the serialization is complete. For storage flavors, this is typically a concrete type. For modification flavors, this is typically a generic parameter for the storage flavor they are wrapped around.
Source§

fn try_extend(&mut self, data: &[u8]) -> Result<(), ()>

The try_extend() trait method can be implemented when there is a more efficient way of processing multiple bytes at once, such as copying a slice to the output, rather than iterating over one byte at a time.
Source§

fn try_push(&mut self, data: u8) -> Result<(), ()>

The try_push() trait method can be used to push a single byte to be modified and/or stored
Source§

fn release(self) -> Result<<StdVec as SerFlavor>::Output, ()>

The release() trait method finalizes the modification or storage operation, and resolved into the type defined by SerFlavor::Output associated type.

Auto Trait Implementations§

§

impl Freeze for StdVec

§

impl RefUnwindSafe for StdVec

§

impl Send for StdVec

§

impl Sync for StdVec

§

impl Unpin for StdVec

§

impl UnwindSafe for StdVec

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.