Struct nano_arena::Arena[][src]

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

Implementations

impl<T> Arena<T>[src]

pub fn new() -> Arena<T>[src]

pub fn with_capacity(capacity: usize) -> Arena<T>[src]

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

pub fn alloc_with_idx<F: FnOnce(Idx) -> T>(&mut self, func: F) -> Idx[src]

pub fn alloc_with<F: FnOnce() -> T>(&mut self, func: F) -> Idx[src]

pub fn insert(&mut self, value: T) -> Idx[src]

pub fn alloc(&mut self, value: T) -> Idx[src]

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

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

pub fn split_at<'a, I: Borrow<Idx>>(
    &'a mut self,
    selected: I
) -> Option<(&mut T, ArenaSplit<'a, T>)>
[src]

pub fn truncate(&mut self, len: usize)[src]

pub fn retain<F: FnMut(&T) -> bool>(&mut self, f: F)[src]

pub fn entries<'a>(&'a self) -> Entries<'a, T>

Notable traits for Entries<'a, T>

impl<'a, T> Iterator for Entries<'a, T> type Item = (Idx, &'a T);
[src]

pub fn entries_mut<'a>(&'a mut self) -> EntriesMut<'a, T>

Notable traits for EntriesMut<'a, T>

impl<'a, T> Iterator for EntriesMut<'a, T> type Item = (Idx, &'a mut T);
[src]

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

Notable traits for IterMut<'a, T>

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

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

Notable traits for Iter<'a, T>

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

pub fn to_vec(self) -> Vec<T>[src]

pub fn remove<I: Borrow<Idx>>(&mut self, index: I) -> T[src]

pub fn swap<A: Borrow<Idx>, B: Borrow<Idx>>(&mut self, a: A, b: B)[src]

pub fn position<F: Fn(&T) -> bool>(&self, func: F) -> Option<Idx>[src]

pub fn apply_ordering<I: Borrow<Idx>>(&mut self, ordering: &Vec<I>)[src]

pub fn swap_remove<I: Borrow<Idx>>(&mut self, index: I) -> T[src]

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

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

Trait Implementations

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

impl<T> FromIterator<T> for Arena<T>[src]

impl<T> Into<Vec<T, Global>> for Arena<T>[src]

Auto Trait Implementations

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

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

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

impl<T> Unpin for Arena<T> where
    T: Unpin

impl<T> UnwindSafe for Arena<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.