Struct default_vec::DefaultVec [] [src]

pub struct DefaultVec<T: Default> { /* fields omitted */ }

A vector with a default value. All uninitialized values are set to T::default().

Methods

impl<T: Default> DefaultVec<T>
[src]

[src]

Creates an empty vector.

[src]

Creates an empty vector with capacity for cap values.

[src]

Returns the total number of values the vector stores.

[src]

Resizes the vector to contain at least new_cap values.

[src]

Get a reference to the value in position idx, panicking if the index is out of bounds.

[src]

Get a reference to the value in position idx, resizing if the index is out of bounds.

[src]

Inserts a value into the vector, returning the old value.

[src]

Removes a value from the vector.

[src]

Starting from start, check each value in the vector and returns the index of the first one that satisfies it, or capacity() if none is found.