pub struct HeapAllocatorImpl { /* private fields */ }Implementations§
Source§impl HeapAllocatorImpl
impl HeapAllocatorImpl
pub fn new() -> Self
pub fn with_capacity(_capacity: usize) -> Self
pub fn get_next_id(&self) -> usize
pub fn set_next_id(&mut self, id: usize)
pub fn alloc_object(&mut self) -> HeapHandleId
pub fn alloc_array(&mut self) -> HeapHandleId
pub fn alloc_function( &mut self, bytecode: Bytecode, arg_count: ArgIndex, local_count: LocalIndex, ) -> HeapHandleId
pub fn alloc_string(&mut self, value: String) -> HeapHandleId
Trait Implementations§
Source§impl Clone for HeapAllocatorImpl
impl Clone for HeapAllocatorImpl
Source§impl Default for HeapAllocatorImpl
impl Default for HeapAllocatorImpl
Source§impl HeapAllocator for HeapAllocatorImpl
impl HeapAllocator for HeapAllocatorImpl
fn allocate(&mut self, entry: HeapEntry) -> HeapHandleId
fn deallocate(&mut self, handle: HeapHandleId) -> bool
fn get(&self, handle: HeapHandleId) -> Option<&HeapEntry>
fn get_mut(&mut self, handle: HeapHandleId) -> Option<&mut HeapEntry>
fn get_entries(&self) -> &HashMap<HeapHandleId, HeapEntry>
fn get_entries_mut(&mut self) -> &mut HashMap<HeapHandleId, HeapEntry>
fn size(&self) -> usize
fn is_empty(&self) -> bool
fn clear(&mut self)
fn get_metrics(&self) -> &HeapMetrics
Auto Trait Implementations§
impl Freeze for HeapAllocatorImpl
impl RefUnwindSafe for HeapAllocatorImpl
impl Send for HeapAllocatorImpl
impl Sync for HeapAllocatorImpl
impl Unpin for HeapAllocatorImpl
impl UnwindSafe for HeapAllocatorImpl
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