pub struct Arena { /* private fields */ }Implementations§
Source§impl Arena
impl Arena
pub unsafe fn new(base: *mut u8, capacity: usize) -> Self
pub fn alloc<T>(&self) -> Option<&mut T>
pub fn alloc_with<T>(&self, value: T) -> Option<&mut T>
pub fn alloc_bytes(&self, len: usize) -> Option<&mut [u8]>
pub fn base_ptr(&self) -> *mut u8
pub fn capacity(&self) -> usize
pub fn used(&self) -> usize
pub fn remaining(&self) -> usize
pub fn usage(&self) -> f32
pub fn reset(&self)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Arena
impl RefUnwindSafe 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