Struct flexbuffers::VectorBuilder[][src]

pub struct VectorBuilder<'a> { /* fields omitted */ }
Expand description

Builds a Flexbuffer vector, returned by a Builder.

Side effect when dropped:

When this is dropped, or end_vector is called, the vector is commited to the buffer. If this vector is the root of the flexbuffer, then the root is written and the flexbuffer is complete. The FlexBufferType of this vector is determined by the pushed values when this is dropped. The most compact vector type is automatically chosen.

Implementations

impl<'a> VectorBuilder<'a>[src]

pub fn push<P: Pushable>(&mut self, p: P)[src]

Pushes p onto the vector.

pub fn start_vector(&mut self) -> VectorBuilder<'_>[src]

Starts a nested vector that will be pushed onto this vector when it is dropped.

pub fn start_map(&mut self) -> MapBuilder<'_>[src]

Starts a nested map that will be pushed onto this vector when it is dropped.

pub fn end_vector(self)[src]

end_vector determines the type of the vector and writes it to the buffer. This will happen automatically if the VectorBuilder is dropped.

Trait Implementations

impl<'a> Drop for VectorBuilder<'a>[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl<'a> RefUnwindSafe for VectorBuilder<'a>

impl<'a> Send for VectorBuilder<'a>

impl<'a> Sync for VectorBuilder<'a>

impl<'a> Unpin for VectorBuilder<'a>

impl<'a> !UnwindSafe for VectorBuilder<'a>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

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

Performs the conversion.

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.

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

Performs the conversion.