pub enum TotalControlFlow {
Halt,
HaltIf,
JumpForwardIf,
PanicIf,
}
Expand description
Control flow operations that keep the program total.
Variants§
Halt
0x60
: HLT
End the execution of the program.
HaltIf
JumpForwardIf
0x63
: JMPIF
Jump forward the given number of instructions if the value is true.
§Stack Input
[n_instruction, condition]
§Panics
- The jump is negative.
- The jump distance is zero.
PanicIf
Trait Implementations§
Source§impl Clone for TotalControlFlow
impl Clone for TotalControlFlow
Source§fn clone(&self) -> TotalControlFlow
fn clone(&self) -> TotalControlFlow
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TotalControlFlow
impl Debug for TotalControlFlow
Source§impl From<TotalControlFlow> for Constraint
impl From<TotalControlFlow> for Constraint
Source§fn from(subgroup: TotalControlFlow) -> Constraint
fn from(subgroup: TotalControlFlow) -> Constraint
Converts to this type from the input type.
Source§impl Hash for TotalControlFlow
impl Hash for TotalControlFlow
Source§impl Ord for TotalControlFlow
impl Ord for TotalControlFlow
Source§fn cmp(&self, other: &TotalControlFlow) -> Ordering
fn cmp(&self, other: &TotalControlFlow) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TotalControlFlow
impl PartialEq for TotalControlFlow
Source§impl PartialOrd for TotalControlFlow
impl PartialOrd for TotalControlFlow
Source§impl ToBytes for TotalControlFlow
impl ToBytes for TotalControlFlow
Source§type Bytes = TotalControlFlow
type Bytes = TotalControlFlow
The iterator yielding bytes.
Source§impl ToOpcode for TotalControlFlow
impl ToOpcode for TotalControlFlow
Source§type Opcode = TotalControlFlow
type Opcode = TotalControlFlow
The associated
Opcode
type.Source§impl TryFromBytes for TotalControlFlow
impl TryFromBytes for TotalControlFlow
Source§type Error = FromBytesError
type Error = FromBytesError
Represents any error that might occur while parsing an op from bytes.
Source§fn try_from_bytes(
bytes: &mut impl Iterator<Item = u8>,
) -> Option<Result<TotalControlFlow, <TotalControlFlow as TryFromBytes>::Error>>
fn try_from_bytes( bytes: &mut impl Iterator<Item = u8>, ) -> Option<Result<TotalControlFlow, <TotalControlFlow as TryFromBytes>::Error>>
Parse a single operation from the given iterator yielding bytes. Read more
impl Copy for TotalControlFlow
impl Eq for TotalControlFlow
impl StructuralPartialEq for TotalControlFlow
Auto Trait Implementations§
impl Freeze for TotalControlFlow
impl RefUnwindSafe for TotalControlFlow
impl Send for TotalControlFlow
impl Sync for TotalControlFlow
impl Unpin for TotalControlFlow
impl UnwindSafe for TotalControlFlow
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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