pub struct Arena<T> { /* private fields */ }Expand description
An Arena<T> is a container of objects of type T that, once allocated,
live as long as the containing arena. Within the arena, objects may refer
to other objects using the Ref<'arena, T> smart-pointer type. These
object references are allowed to form cycles. Once created, an object is
immutable. However, any Ref<'arena, T> instances within the object may be
set exactly once. The common usage pattern is to create objects and set
all their refs before returning them to user code; the objects are
subsequently completely immutable.
Implementations§
Auto Trait Implementations§
impl<T> !Freeze for Arena<T>
impl<T> !RefUnwindSafe for Arena<T>
impl<T> Send for Arena<T>where
T: Send,
impl<T> !Sync for Arena<T>
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