Struct pinned_vec::PinnedVec [−][src]
pub struct PinnedVec<T> { /* fields omitted */ }
Expand description
Vec-like structure whose elements never move.
Implementations
Get the current capacity of the PinnedVec Pushing within capacity means no extra allocation. Pushing over capacity will cause allocation, increasing capacity.
Get a pinned reference to the element at the specified index, if it exists.
Get a pinned mutable reference to the element at the specified index, if it exists.
Push an element to the end of the PinnedVec. Might cause the PinnedVec to allocate a new sub-vector.
Remove the last element in the PinnedVec. The element is not returned because that would violate Pin invariant.
Panics
Panics if the vec is empty.