Struct nano_arena::Arena [−][src]
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]
&'a mut self,
selected: I
) -> Option<(&mut T, ArenaSplit<'a, T>)>
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>ⓘ
[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]
Notable traits for EntriesMut<'a, T>
impl<'a, T> Iterator for EntriesMut<'a, T> type Item = (Idx, &'a mut T);
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<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]
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
[src]
impl<T> Into<Vec<T, Global>> 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,
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>,