pub enum VMStatus<F> {
Finished {
return_data_offset: u32,
return_data_size: u32,
},
InProgress,
Failure {
reason: FailureReason,
call_stack: ErrorCallStack,
},
ForeignCallWait {
function: String,
inputs: Vec<ForeignCallParam<F>>,
},
}Expand description
Represents the current execution status of the Brillig VM.
Variants§
Finished
The VM has completed execution successfully. The output of the program is stored in the VM memory and can be accessed via the provided offset and size.
Fields
InProgress
The VM is still in progress and has not yet completed execution. This is used when simulating execution.
Failure
The VM encountered a failure and halted execution.
Fields
reason: FailureReasonThe reason for the failure.
call_stack: ErrorCallStackThe call stack at the time the failure occurred, useful for debugging nested calls.
ForeignCallWait
The VM process is not solvable as a [foreign call][Opcode::ForeignCall] has been reached where the outputs are yet to be resolved.
The caller should interpret the information returned to compute a [ForeignCallResult] and update the Brillig process. The VM can then be restarted to fully solve the previously unresolved foreign call as well as the remaining Brillig opcodes.
Trait Implementations§
impl<F: Eq> Eq for VMStatus<F>
impl<F> StructuralPartialEq for VMStatus<F>
Auto Trait Implementations§
impl<F> Freeze for VMStatus<F>
impl<F> RefUnwindSafe for VMStatus<F>where
F: RefUnwindSafe,
impl<F> Send for VMStatus<F>where
F: Send,
impl<F> Sync for VMStatus<F>where
F: Sync,
impl<F> Unpin for VMStatus<F>where
F: Unpin,
impl<F> UnwindSafe for VMStatus<F>where
F: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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>
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>
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