[−][src]Struct chunky_vec::ChunkyVec
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>ⓘ
[src]
Returns an iterator that yields shared references to the elements of the bucket vector.
pub fn iter_mut(&mut self) -> IterMut<'_, 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.
fn index(&self, index: usize) -> &Self::Output
[src]
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?
fn into_iter(self) -> Iter<'a, T>ⓘ
[src]
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?
fn into_iter(self) -> IterMut<'a, T>ⓘ
[src]
impl<T> Unpin for ChunkyVec<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for ChunkyVec<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for ChunkyVec<T> where
T: Send,
T: Send,
impl<T> Sync for ChunkyVec<T> where
T: Sync,
T: Sync,
impl<T> UnwindSafe for ChunkyVec<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,