pub struct VecHeap { /* private fields */ }Expand description
Simple Vec-backed heap for the interpreter. No GC.
Implementations§
Trait Implementations§
Source§impl Heap for VecHeap
impl Heap for VecHeap
Source§fn alloc(&mut self, env: Env, expr: CoreExpr) -> ThunkId
fn alloc(&mut self, env: Env, expr: CoreExpr) -> ThunkId
Allocate a new thunk. Returns its id.
Source§fn read(&self, id: ThunkId) -> &ThunkState
fn read(&self, id: ThunkId) -> &ThunkState
Read the current state of a thunk.
Source§fn write(&mut self, id: ThunkId, state: ThunkState)
fn write(&mut self, id: ThunkId, state: ThunkState)
Write a new state to a thunk (for force protocol and LetRec back-patching).
Auto Trait Implementations§
impl Freeze for VecHeap
impl RefUnwindSafe for VecHeap
impl Send for VecHeap
impl Sync for VecHeap
impl Unpin for VecHeap
impl UnsafeUnpin for VecHeap
impl UnwindSafe for VecHeap
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