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
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more