Struct cl_arena::typed_arena::TypedArena
source · pub struct TypedArena<'arena, T> { /* private fields */ }
Expand description
A TypedArena can hold many instances of a single type, and will properly Drop them when it falls out of scope.
Implementations§
source§impl<'arena, T> TypedArena<'arena, T>
impl<'arena, T> TypedArena<'arena, T>
pub const fn new() -> Self
pub fn alloc(&'arena self, value: T) -> &'arena mut T
pub fn alloc_from_iter<I>(&'arena self, iter: I) -> &'arena mut [T]where
I: IntoIterator<Item = T>,
Trait Implementations§
source§impl<'arena, T> Default for TypedArena<'arena, T>
impl<'arena, T> Default for TypedArena<'arena, T>
source§impl<'arena, T> Drop for TypedArena<'arena, T>
impl<'arena, T> Drop for TypedArena<'arena, T>
impl<'arena, T: Send> Send for TypedArena<'arena, T>
Auto Trait Implementations§
impl<'arena, T> !Freeze for TypedArena<'arena, T>
impl<'arena, T> !RefUnwindSafe for TypedArena<'arena, T>
impl<'arena, T> !Sync for TypedArena<'arena, T>
impl<'arena, T> Unpin for TypedArena<'arena, T>where
T: Unpin,
impl<'arena, T> UnwindSafe for TypedArena<'arena, T>where
T: UnwindSafe + RefUnwindSafe,
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