[][src]Trait flatk::Reserve

pub trait Reserve {
    fn reserve_with_storage(&mut self, n: usize, storage_n: usize);

    fn reserve(&mut self, n: usize) { ... }
}

A trait that allows the container to allocate additional space without changing any of the data. The container should allocate space for at least n additional elements.

Composite collections such a Chunked or Select may choose to only reserve primary level storage if the amount of total storage required cannot be specified by a single number in reserve. This is the default behaviour of the reserve function below. The reserve_with_storage method allows the caller to also specify the amount of storage needed for the container at the lowest level.

Required methods

fn reserve_with_storage(&mut self, n: usize, storage_n: usize)

Loading content...

Provided methods

fn reserve(&mut self, n: usize)

Loading content...

Implementations on Foreign Types

impl<T> Reserve for Vec<T>[src]

Loading content...

Implementors

impl<O: Reserve> Reserve for Offsets<O>[src]

impl<O: Reserve> Reserve for SortedChunks<O>[src]

impl<S, I: Reserve> Reserve for Select<S, I>[src]

impl<S: Reserve, N: Dimension> Reserve for UniChunked<S, N>[src]

impl<S: Reserve, O: Reserve> Reserve for Chunked<S, O>[src]

impl<S: Reserve, T, I: Reserve> Reserve for Sparse<S, T, I>[src]

Loading content...