pub struct TypedArena<'ctx, T> {
elems: RefCell<Vec<ArenaChunk<T>>>,
start: Cell<*mut T>,
end: Cell<*mut T>,
_marker: PhantomData<&'ctx T>,
}
Fields§
§elems: RefCell<Vec<ArenaChunk<T>>>
§start: Cell<*mut T>
§end: Cell<*mut T>
§_marker: PhantomData<&'ctx T>
Implementations§
Source§impl<'ctx, T> TypedArena<'ctx, T>
impl<'ctx, T> TypedArena<'ctx, T>
fn reserve(&self, amount: usize)
Sourcepub fn alloc_iter<I>(&self, values: I) -> &'ctx mut [T]where
I: IntoIterator<Item = T>,
pub fn alloc_iter<I>(&self, values: I) -> &'ctx mut [T]where
I: IntoIterator<Item = T>,
Allocs an slice of elements from the given Iterator
The iterator must be an ExactSizeIterator
Sourcepub fn alloc(&self, value: T) -> &'ctx mut T
pub fn alloc(&self, value: T) -> &'ctx mut T
Allocs an element, and returns a reference to it
Trait Implementations§
Auto Trait Implementations§
impl<'ctx, T> !Freeze for TypedArena<'ctx, T>
impl<'ctx, T> !RefUnwindSafe for TypedArena<'ctx, T>
impl<'ctx, T> !Send for TypedArena<'ctx, T>
impl<'ctx, T> !Sync for TypedArena<'ctx, T>
impl<'ctx, T> Unpin for TypedArena<'ctx, T>
impl<'ctx, T> UnwindSafe for TypedArena<'ctx, T>where
T: 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