[−][src]Struct nano_arena::Arena
Methods
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(&mut self, value: T) -> Idx
[src]
pub fn get<I: Borrow<Idx>>(&self, index: I) -> Option<&T>
[src]
pub fn get_mut<'a, I: Borrow<Idx>>(&'a mut self, index: I) -> Option<&'a mut T>
[src]
pub fn iter_mut<'a>(&'a mut self) -> IterMut<'a, T>
[src]
pub fn iter<'a>(&'a self) -> Iter<'a, T>
[src]
pub fn to_vec(self) -> Vec<T>
[src]
pub fn remove(&mut self, index: &Idx) -> T
[src]
pub fn swap<A: Borrow<Idx>, B: Borrow<Idx>>(&mut self, a: A, b: B)
[src]
pub fn apply_ordering<I>(&mut self, ordering: &Vec<Idx>)
[src]
pub fn swap_remove<I: Borrow<Idx>>(&mut self, index: I) -> T
[src]
Trait Implementations
impl<T> Default for Arena<T>
[src]
impl<T> FromIterator<T> for Arena<T>
[src]
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
[src]
impl<T> Into<Vec<T>> for Arena<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Arena<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Arena<T> where
T: Send,
T: Send,
impl<T> Sync for Arena<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Arena<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Arena<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,
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.
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>,