pub struct Arena { /* private fields */ }Expand description
A bump-allocator arena within a MemorySlab.
base_offset is the starting position inside the slab.
Allocations grow upward; reset() reclaims all space.
Implementations§
Source§impl Arena
impl Arena
Sourcepub fn new(base_offset: usize, size: usize) -> Self
pub fn new(base_offset: usize, size: usize) -> Self
Create a new arena starting at base_offset with the given size.
Auto Trait Implementations§
impl Freeze for Arena
impl RefUnwindSafe for Arena
impl Send for Arena
impl Sync for Arena
impl Unpin for Arena
impl UnsafeUnpin for Arena
impl UnwindSafe for Arena
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