Struct null_vec::NullVec
[−]
[src]
pub struct NullVec<T: Nullable> { /* fields omitted */ }
A vector of a nullable type. Conceptually the vector is an infinite list of values, some of which are non-null. This allows constant-time removal of elements by index.
Methods
impl<T: Nullable> NullVec<T>
[src]
fn new() -> Self
[src]
fn with_capacity(cap: usize) -> Self
[src]
fn insert<U: Into<T>>(&mut self, idx: usize, val: U) -> T
[src]
Inserts a value into the vector, returning the old value.
fn remove(&mut self, idx: usize) -> T
[src]
Removes a value from the vector, returning its value.
fn get(&self, idx: usize) -> T where
T: Copy,
[src]
T: Copy,
Returns a value in the vector.
fn space(&self, start: usize) -> usize
[src]
Starting from start
, returns the index of the first null value, or capacity()
if
no value was found.