[][src]Struct flexbuffers::VectorBuilder

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

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]

Auto Trait Implementations

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

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

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

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

impl<'a> !UnwindSafe for VectorBuilder<'a>[src]

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, 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.