Enum essential_constraint_vm::asm::Pred
source · pub enum Pred {
Eq,
EqRange,
Gt,
Lt,
Gte,
Lte,
And,
Or,
Not,
}
Expand description
Operations for computing predicates.
Variants§
Eq
EqRange
0x11
Check equality of two ranges on the stack.
The ranges must be of equal length.
The ranges must be stacked sequentially.
Here N
is len -1
.
§Stack Input
[arr_a_0, ..arr_a_N, arr_b_0, ..arr_b_N, len]
§Stack Output
[(top-(2*len))..(top - len) == (top - len)..top]
Gt
0x12
Check if left-hand side is greater than right-hand side.
§Stack Input
[lhs, rhs]
§Stack Output
[lhs > rhs]
Lt
0x13
Check if left-hand side is less than right-hand side.
§Stack Input
[lhs, rhs]
§Stack Output
[lhs < rhs]
Gte
0x14
Check if left-hand side is greater than or equal to right-hand side.
§Stack Input
[lhs, rhs]
§Stack Output
[lhs >= rhs]
Lte
0x15
Check if left-hand side is less than or equal to right-hand side.
§Stack Input
[lhs, rhs]
§Stack Output
[lhs <= rhs]
And
Or
Not
Trait Implementations§
source§impl From<Pred> for Constraint
impl From<Pred> for Constraint
source§fn from(subgroup: Pred) -> Constraint
fn from(subgroup: Pred) -> Constraint
Converts to this type from the input type.
source§impl Ord for Pred
impl Ord for Pred
source§impl PartialEq for Pred
impl PartialEq for Pred
source§impl PartialOrd for Pred
impl PartialOrd for Pred
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFromBytes for Pred
impl TryFromBytes for Pred
§type Error = FromBytesError
type Error = FromBytesError
Represents any error that might occur while parsing an op from bytes.
impl Copy for Pred
impl Eq for Pred
impl StructuralPartialEq for Pred
Auto Trait Implementations§
impl Freeze for Pred
impl RefUnwindSafe for Pred
impl Send for Pred
impl Sync for Pred
impl Unpin for Pred
impl UnwindSafe for Pred
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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