pub struct ThreadLocalArena { /* private fields */ }Expand description
Thread-local arena for temporary allocations.
Each thread gets its own bump arena that can be used for short-lived allocations without synchronization.
Implementations§
Source§impl ThreadLocalArena
impl ThreadLocalArena
Sourcepub fn alloc(&mut self, size: usize) -> ArenaOffset
pub fn alloc(&mut self, size: usize) -> ArenaOffset
Allocate bytes.
Sourcepub fn bytes_used(&self) -> usize
pub fn bytes_used(&self) -> usize
Bytes used.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ThreadLocalArena
impl !RefUnwindSafe for ThreadLocalArena
impl Send for ThreadLocalArena
impl !Sync for ThreadLocalArena
impl Unpin for ThreadLocalArena
impl UnsafeUnpin for ThreadLocalArena
impl UnwindSafe for ThreadLocalArena
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