pub enum Instruction<N: Network> {
Show 56 variants Abs(Abs<N>), AbsWrapped(UnaryLiteral<N, AbsWrappedOperation<N>>), Add(BinaryLiteral<N, AddOperation<N>>), AddWrapped(BinaryLiteral<N, AddWrappedOperation<N>>), And(And<N>), AssertEq(AssertEq<N>), AssertNeq(AssertNeq<N>), Call(Call<N>), Cast(Cast<N>), CommitBHP256(CommitBHP256<N>), CommitBHP512(CommitBHP512<N>), CommitBHP768(CommitBHP768<N>), CommitBHP1024(CommitBHP1024<N>), CommitPED64(CommitPED64<N>), CommitPED128(CommitPED128<N>), Div(BinaryLiteral<N, DivOperation<N>>), DivWrapped(BinaryLiteral<N, DivWrappedOperation<N>>), Double(UnaryLiteral<N, DoubleOperation<N>>), GreaterThan(GreaterThan<N>), GreaterThanOrEqual(GreaterThanOrEqual<N>), HashBHP256(HashBHP256<N>), HashBHP512(HashBHP512<N>), HashBHP768(HashBHP768<N>), HashBHP1024(HashBHP1024<N>), HashPED64(HashPED64<N>), HashPED128(HashPED128<N>), HashPSD2(HashPSD2<N>), HashPSD4(HashPSD4<N>), HashPSD8(HashPSD8<N>), Inv(Inv<N>), IsEq(IsEq<N>), IsNeq(IsNeq<N>), LessThan(LessThan<N>), LessThanOrEqual(LessThanOrEqual<N>), Modulo(BinaryLiteral<N, ModuloOperation<N>>), Mul(BinaryLiteral<N, MulOperation<N>>), MulWrapped(BinaryLiteral<N, MulWrappedOperation<N>>), Nand(BinaryLiteral<N, NandOperation<N>>), Neg(UnaryLiteral<N, NegOperation<N>>), Nor(BinaryLiteral<N, NorOperation<N>>), Not(UnaryLiteral<N, NotOperation<N>>), Or(Or<N>), Pow(BinaryLiteral<N, PowOperation<N>>), PowWrapped(BinaryLiteral<N, PowWrappedOperation<N>>), Rem(BinaryLiteral<N, RemOperation<N>>), RemWrapped(BinaryLiteral<N, RemWrappedOperation<N>>), Shl(BinaryLiteral<N, ShlOperation<N>>), ShlWrapped(BinaryLiteral<N, ShlWrappedOperation<N>>), Shr(BinaryLiteral<N, ShrOperation<N>>), ShrWrapped(BinaryLiteral<N, ShrWrappedOperation<N>>), Square(UnaryLiteral<N, SquareOperation<N>>), SquareRoot(UnaryLiteral<N, SquareRootOperation<N>>), Sub(BinaryLiteral<N, SubOperation<N>>), SubWrapped(BinaryLiteral<N, SubWrappedOperation<N>>), Ternary(TernaryLiteral<N, TernaryOperation<N>>), Xor(Xor<N>),
}

Variants

Abs(Abs<N>)

Compute the absolute value of first, checking for overflow, and storing the outcome in destination.

AbsWrapped(UnaryLiteral<N, AbsWrappedOperation<N>>)

Compute the absolute value of first, wrapping around at the boundary of the type, and storing the outcome in destination.

Add(BinaryLiteral<N, AddOperation<N>>)

Adds first with second, storing the outcome in destination.

AddWrapped(BinaryLiteral<N, AddWrappedOperation<N>>)

Adds first with second, wrapping around at the boundary of the type, and storing the outcome in destination.

And(And<N>)

Performs a bitwise and operation on first and second, storing the outcome in destination.

AssertEq(AssertEq<N>)

Asserts first and second are equal.

AssertNeq(AssertNeq<N>)

Asserts first and second are not equal.

Call(Call<N>)

Calls a closure on the operands.

Cast(Cast<N>)

Casts the operands into the declared type.

CommitBHP256(CommitBHP256<N>)

Performs a BHP commitment on inputs of 256-bit chunks.

CommitBHP512(CommitBHP512<N>)

Performs a BHP commitment on inputs of 512-bit chunks.

CommitBHP768(CommitBHP768<N>)

Performs a BHP commitment on inputs of 768-bit chunks.

CommitBHP1024(CommitBHP1024<N>)

Performs a BHP commitment on inputs of 1024-bit chunks.

CommitPED64(CommitPED64<N>)

Performs a Pedersen commitment on up to a 64-bit input.

CommitPED128(CommitPED128<N>)

Performs a Pedersen commitment on up to a 128-bit input.

Div(BinaryLiteral<N, DivOperation<N>>)

Divides first by second, storing the outcome in destination.

DivWrapped(BinaryLiteral<N, DivWrappedOperation<N>>)

Divides first by second, wrapping around at the boundary of the type, and storing the outcome in destination.

Double(UnaryLiteral<N, DoubleOperation<N>>)

Doubles first, storing the outcome in destination.

GreaterThan(GreaterThan<N>)

Computes whether first is greater than second as a boolean, storing the outcome in destination.

GreaterThanOrEqual(GreaterThanOrEqual<N>)

Computes whether first is greater than or equal to second as a boolean, storing the outcome in destination.

HashBHP256(HashBHP256<N>)

Performs a BHP hash on inputs of 256-bit chunks.

HashBHP512(HashBHP512<N>)

Performs a BHP hash on inputs of 512-bit chunks.

HashBHP768(HashBHP768<N>)

Performs a BHP hash on inputs of 768-bit chunks.

HashBHP1024(HashBHP1024<N>)

Performs a BHP hash on inputs of 1024-bit chunks.

HashPED64(HashPED64<N>)

Performs a Pedersen hash on up to a 64-bit input.

HashPED128(HashPED128<N>)

Performs a Pedersen hash on up to a 128-bit input.

HashPSD2(HashPSD2<N>)

Performs a Poseidon hash with an input rate of 2.

HashPSD4(HashPSD4<N>)

Performs a Poseidon hash with an input rate of 4.

HashPSD8(HashPSD8<N>)

Performs a Poseidon hash with an input rate of 8.

Inv(Inv<N>)

Computes the multiplicative inverse of first, storing the outcome in destination.

IsEq(IsEq<N>)

Computes whether first equals second as a boolean, storing the outcome in destination.

IsNeq(IsNeq<N>)

Computes whether first does not equals second as a boolean, storing the outcome in destination.

LessThan(LessThan<N>)

Computes whether first is less than second as a boolean, storing the outcome in destination.

LessThanOrEqual(LessThanOrEqual<N>)

Computes whether first is less than or equal to second as a boolean, storing the outcome in destination.

Modulo(BinaryLiteral<N, ModuloOperation<N>>)

Computes first mod second, storing the outcome in destination.

Mul(BinaryLiteral<N, MulOperation<N>>)

Multiplies first with second, storing the outcome in destination.

MulWrapped(BinaryLiteral<N, MulWrappedOperation<N>>)

Multiplies first with second, wrapping around at the boundary of the type, and storing the outcome in destination.

Nand(BinaryLiteral<N, NandOperation<N>>)

Returns false if first and second are true, storing the outcome in destination.

Neg(UnaryLiteral<N, NegOperation<N>>)

Negates first, storing the outcome in destination.

Nor(BinaryLiteral<N, NorOperation<N>>)

Returns true if neither first nor second is true, storing the outcome in destination.

Not(UnaryLiteral<N, NotOperation<N>>)

Flips each bit in the representation of first, storing the outcome in destination.

Or(Or<N>)

Performs a bitwise or on first and second, storing the outcome in destination.

Pow(BinaryLiteral<N, PowOperation<N>>)

Raises first to the power of second, storing the outcome in destination.

PowWrapped(BinaryLiteral<N, PowWrappedOperation<N>>)

Raises first to the power of second, wrapping around at the boundary of the type, storing the outcome in destination.

Rem(BinaryLiteral<N, RemOperation<N>>)

Divides first by second, storing the remainder in destination.

RemWrapped(BinaryLiteral<N, RemWrappedOperation<N>>)

Divides first by second, wrapping around at the boundary of the type, storing the remainder in destination.

Shl(BinaryLiteral<N, ShlOperation<N>>)

Shifts first left by second bits, storing the outcome in destination.

ShlWrapped(BinaryLiteral<N, ShlWrappedOperation<N>>)

Shifts first left by second bits, continuing past the boundary of the type, storing the outcome in destination.

Shr(BinaryLiteral<N, ShrOperation<N>>)

Shifts first right by second bits, storing the outcome in destination.

ShrWrapped(BinaryLiteral<N, ShrWrappedOperation<N>>)

Shifts first right by second bits, continuing past the boundary of the type, storing the outcome in destination.

Square(UnaryLiteral<N, SquareOperation<N>>)

Squares ‘first’, storing the outcome in destination.

SquareRoot(UnaryLiteral<N, SquareRootOperation<N>>)

Compute the square root of ‘first’, storing the outcome in destination.

Sub(BinaryLiteral<N, SubOperation<N>>)

Computes first - second, storing the outcome in destination.

SubWrapped(BinaryLiteral<N, SubWrappedOperation<N>>)

Computes first - second, wrapping around at the boundary of the type, and storing the outcome in destination.

Ternary(TernaryLiteral<N, TernaryOperation<N>>)

Selects first, if condition is true, otherwise selects second, storing the result in destination.

Xor(Xor<N>)

Performs a bitwise xor on first and second, storing the outcome in destination.

Implementations

The list of all instruction opcodes.

Returns the opcode of the instruction.

Returns the operands of the instruction.

Returns the destination register of the instruction.

Evaluates the instruction.

Executes the instruction.

Returns the output type from the given input types.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Prints the instruction as a string.

Prints the instruction as a string.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Reads Self from reader as little-endian bytes.

Returns Self from a byte array in little-endian order.

Parses a string into an instruction.

The associated error which can be returned from parsing.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Parses a string into an instruction.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Writes self into writer as little-endian bytes.

Returns self as a byte array in little-endian order.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more