[][src]Struct lv2_atom::vector::VectorWriter

pub struct VectorWriter<'a, 'b, A: ScalarAtom> { /* fields omitted */ }

Handle to append elements to a vector.

This works by allocating a slice of memory behind the vector and then writing your data to it.

Implementations

impl<'a, 'b, A: ScalarAtom> VectorWriter<'a, 'b, A>[src]

pub fn push(&mut self, child: A::InternalType) -> Option<&mut A::InternalType>[src]

Push a single value to the vector.

pub fn allocate(&mut self, size: usize) -> Option<&mut [A::InternalType]>[src]

Append a slice of undefined memory to the vector.

Using this method, you don't need to have the elements in memory before you can write them.

pub fn append(
    &mut self,
    data: &[A::InternalType]
) -> Option<&mut [A::InternalType]>
[src]

Append multiple elements to the vector.

Auto Trait Implementations

impl<'a, 'b, A> !RefUnwindSafe for VectorWriter<'a, 'b, A>

impl<'a, 'b, A> !Send for VectorWriter<'a, 'b, A>

impl<'a, 'b, A> !Sync for VectorWriter<'a, 'b, A>

impl<'a, 'b, A> Unpin for VectorWriter<'a, 'b, A> where
    A: Unpin,
    'a: 'b, 

impl<'a, 'b, A> !UnwindSafe for VectorWriter<'a, 'b, A>

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.