[][src]Struct chunky_vec::ChunkyVec

pub struct ChunkyVec<T> { /* fields omitted */ }

Pin safe vector

An append only vector that never moves the backing store for each element.

Implementations

impl<T> ChunkyVec<T>[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn iter(&self) -> Iter<'_, T>

Notable traits for Iter<'a, T>

impl<'a, T> Iterator for Iter<'a, T> type Item = &'a T;
[src]

Returns an iterator that yields shared references to the elements of the bucket vector.

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Notable traits for IterMut<'a, T>

impl<'a, T> Iterator for IterMut<'a, T> type Item = &'a mut T;
[src]

Returns an iterator that yields exclusive reference to the elements of the bucket vector.

pub fn get(&self, index: usize) -> Option<&T>[src]

Returns a shared reference to the element at the given index if any.

pub fn get_mut(&mut self, index: usize) -> Option<&mut T>[src]

Returns an exclusive reference to the element at the given index if any.

pub fn push(&mut self, new_value: T)[src]

Pushes a new element onto the bucket vector.

Note

This operation will never move other elements, reallocates or otherwise invalidate pointers of elements contained by the bucket vector.

pub fn push_get(&mut self, new_value: T) -> &mut T[src]

Trait Implementations

impl<T> Default for ChunkyVec<T>[src]

impl<T> Index<usize> for ChunkyVec<T>[src]

type Output = T

The returned type after indexing.

impl<T> IndexMut<usize> for ChunkyVec<T>[src]

impl<'a, T> IntoIterator for &'a ChunkyVec<T>[src]

type Item = &'a T

The type of the elements being iterated over.

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?

impl<'a, T> IntoIterator for &'a mut ChunkyVec<T>[src]

type Item = &'a mut T

The type of the elements being iterated over.

type IntoIter = IterMut<'a, T>

Which kind of iterator are we turning this into?

impl<T> Unpin for ChunkyVec<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for ChunkyVec<T> where
    T: RefUnwindSafe

impl<T> Send for ChunkyVec<T> where
    T: Send

impl<T> Sync for ChunkyVec<T> where
    T: Sync

impl<T> UnwindSafe for ChunkyVec<T> where
    T: UnwindSafe

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.