Struct polars_plan::prelude::Arena
source · pub struct Arena<T> { /* private fields */ }
Implementations§
source§impl<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() -> Arena<T>
pub fn with_capacity(cap: usize) -> Arena<T>
pub fn get_node(&self, val: &T) -> Option<Node>
pub fn swap(&mut self, idx_a: Node, idx_b: Node)
pub fn get(&self, idx: Node) -> &T
sourcepub unsafe fn get_unchecked(&self, idx: Node) -> &T
pub unsafe fn get_unchecked(&self, idx: Node) -> &T
§Safety
Doesn’t do any bound checks
pub fn get_mut(&mut self, idx: Node) -> &mut T
pub fn replace(&mut self, idx: Node, val: T)
pub fn clear(&mut self)
Trait Implementations§
source§impl<'a> ArenaExprIter<'a> for &'a Arena<AExpr>
impl<'a> ArenaExprIter<'a> for &'a Arena<AExpr>
source§impl<'a> ArenaLpIter<'a> for &'a Arena<ALogicalPlan>
impl<'a> ArenaLpIter<'a> for &'a Arena<ALogicalPlan>
Auto Trait Implementations§
impl<T> Freeze for Arena<T>
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more