enum Frame {
CallFrame {
call_frame: CallFrame,
span: Span,
},
Generator {
name: &'static str,
span: Span,
state: GeneratorState,
generator: Gen<VMRequest, VMResponse, Pin<Box<dyn Future<Output = Result<Value, ErrorKind>>>>>,
},
}
Expand description
A frame represents an execution state of the VM. The VM has a stack of frames representing the nesting of execution inside of the VM, and operates on the frame at the top.
When a frame has been fully executed, it is removed from the VM’s frame
stack and expected to leave a result Value
on the top of the stack.
Variants§
CallFrame
CallFrame represents the execution of Tvix bytecode within a thunk, function or closure.
Fields
Generator
Generator represents a frame that can yield further instructions to the VM while its execution is being driven.
A generator is essentially an asynchronous function that can be suspended while waiting for the VM to do something (e.g. thunk forcing), and resume at the same point.
Implementations§
Auto Trait Implementations§
impl Freeze for Frame
impl !RefUnwindSafe for Frame
impl !Send for Frame
impl !Sync for Frame
impl Unpin for Frame
impl !UnwindSafe for Frame
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more