pub struct ClosureArena { /* private fields */ }Implementations§
Source§impl ClosureArena
impl ClosureArena
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn set_debug(self, is_debug: bool) -> Self
pub fn allocate_closure(&mut self, closure: ClosureObject) -> ClosureHandle
pub fn get_closure(&self, handle: ClosureHandle) -> &ClosureObject
pub fn get_closure_mut(&mut self, handle: ClosureHandle) -> &mut ClosureObject
pub fn free_closure(&mut self, handle: ClosureHandle)
pub fn get_upvalue( &self, closure_handle: ClosureHandle, index: usize, ) -> Option<UpvalueSlot>
pub fn set_upvalue( &mut self, closure_handle: ClosureHandle, index: usize, value: UpvalueSlot, ) -> bool
pub fn allocate_overflow_chunk(&mut self) -> OverflowHandle
pub fn get_overflow_chunk( &self, handle: OverflowHandle, ) -> Option<&OverflowChunk>
pub fn get_overflow_chunk_mut( &mut self, handle: OverflowHandle, ) -> Option<&mut OverflowChunk>
pub fn mark_closure(&mut self, handle: ClosureHandle)
pub fn mark_overflow_chain(&mut self, handle: OverflowHandle)
pub fn trace_closure_references( &mut self, handle: ClosureHandle, upvalue_tracer: &mut dyn FnMut(UpvalueHandle), )
pub fn collect_garbage(&mut self)
pub fn get_allocated_bytes(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = (ClosureHandle, &ClosureObject)>
pub fn iter_mut( &mut self, ) -> impl Iterator<Item = (ClosureHandle, &mut ClosureObject)>
Trait Implementations§
Source§impl Clone for ClosureArena
impl Clone for ClosureArena
Source§impl Debug for ClosureArena
impl Debug for ClosureArena
Auto Trait Implementations§
impl Freeze for ClosureArena
impl RefUnwindSafe for ClosureArena
impl Send for ClosureArena
impl Sync for ClosureArena
impl Unpin for ClosureArena
impl UnsafeUnpin for ClosureArena
impl UnwindSafe for ClosureArena
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