pub struct PooledArena { /* private fields */ }Expand description
An arena on loan from this thread’s pool.
It is a MorselArena in every way that matters, through Deref,
and the only thing it adds is where it goes when it is dropped.
Methods from Deref<Target = MorselArena>§
Sourcepub fn alloc(&mut self, bytes: usize, align: usize) -> RawBuf
pub fn alloc(&mut self, bytes: usize, align: usize) -> RawBuf
Bump-allocate bytes with the given alignment (a power of two,
at most 64: blocks themselves are 64-byte aligned so any larger
request could not be honored from a bump offset).
Sourcepub fn alloc_of<T: Pod>(&mut self, count: usize) -> RawBuf
pub fn alloc_of<T: Pod>(&mut self, count: usize) -> RawBuf
Allocate a typed buffer for count values.
Trait Implementations§
Source§impl Deref for PooledArena
impl Deref for PooledArena
Source§type Target = MorselArena
type Target = MorselArena
The resulting type after dereferencing.
Source§fn deref(&self) -> &MorselArena
fn deref(&self) -> &MorselArena
Dereferences the value.
Source§impl DerefMut for PooledArena
impl DerefMut for PooledArena
Source§fn deref_mut(&mut self) -> &mut MorselArena
fn deref_mut(&mut self) -> &mut MorselArena
Mutably dereferences the value.
Source§impl Drop for PooledArena
impl Drop for PooledArena
Auto Trait Implementations§
impl !Sync for PooledArena
impl Freeze for PooledArena
impl RefUnwindSafe for PooledArena
impl Send for PooledArena
impl Unpin for PooledArena
impl UnsafeUnpin for PooledArena
impl UnwindSafe for PooledArena
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