[][src]Struct vint32::vint_array::VIntArray

pub struct VIntArray {
    pub data: Vec<u8>,
}

Fields

data: Vec<u8>

Implementations

impl VIntArray[src]

Encodes vint32 unsigned 32-bit integers into a vec.

pub fn from_vals(vals: &[u32]) -> VIntArray[src]

Creates a VIntArray from a slice of u32

pub fn encode_vals(&mut self, vals: &[u32])[src]

Encode vals into VIntArray

pub fn serialize(&self) -> Vec<u8>[src]

serializes VIntArray, by appending its size vint-encoded and then the data. Maximum supported size of encoded data is therefore u32::MAX

pub fn encode(&mut self, val: u32)[src]

Encode single val into VIntArray

pub fn iter(&self) -> VintArrayIterator<'_>

Notable traits for VintArrayIterator<'a>

impl<'a> Iterator for VintArrayIterator<'a> type Item = u32;
[src]

Trait Implementations

impl Clone for VIntArray[src]

impl Debug for VIntArray[src]

impl Default for VIntArray[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.