#[non_exhaustive]pub enum VmOutcome {
Complete(Value),
Yielded(Value),
Limited,
}Expand description
The outcome of completing an execution through a VmResume operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Complete(Value)
A value has been produced by the execution returning.
Yielded(Value)
A value has been yielded by the execution.
Limited
The execution has been limited.
Implementations§
Source§impl VmOutcome
impl VmOutcome
Sourcepub fn into_generator_state(self) -> Result<GeneratorState, VmError>
pub fn into_generator_state(self) -> Result<GeneratorState, VmError>
Convert the outcome into a GeneratorState.
§Errors
If the execution is not in a state compatible with producing a generator state, such as having been completed or yielded, this will produce an error.
Auto Trait Implementations§
impl Freeze for VmOutcome
impl !RefUnwindSafe for VmOutcome
impl !Send for VmOutcome
impl !Sync for VmOutcome
impl Unpin for VmOutcome
impl !UnwindSafe for VmOutcome
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