Struct polars_utils::arena::Arena
source · [−]pub struct Arena<T> { /* private fields */ }
Implementations
sourceimpl<T> Arena<T>
impl<T> Arena<T>
Simple Arena implementation Allocates memory and stores item in a Vec. Only deallocates when being dropped itself.
pub fn add(&mut self, val: T) -> Node
pub fn pop(&mut self) -> Option<T>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn new() -> Self
pub fn with_capacity(cap: usize) -> Self
pub fn get_node(&self, val: &T) -> Option<Node>
pub fn get(&self, idx: Node) -> &T
pub fn get_mut(&mut self, idx: Node) -> &mut T
pub fn replace(&mut self, idx: Node, val: T)
Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more