Struct snarkvm_synthesizer_program::logic::instruction::Literals
source · pub struct Literals<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> { /* private fields */ }
Implementations§
source§impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> Literals<N, O, NUM_OPERANDS>
impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> Literals<N, O, NUM_OPERANDS>
source§impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> Literals<N, O, NUM_OPERANDS>
impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> Literals<N, O, NUM_OPERANDS>
sourcepub fn evaluate(
&self,
stack: &(impl StackMatches<N> + StackProgram<N>),
registers: &mut (impl RegistersLoad<N> + RegistersStore<N>)
) -> Result<()>
pub fn evaluate( &self, stack: &(impl StackMatches<N> + StackProgram<N>), registers: &mut (impl RegistersLoad<N> + RegistersStore<N>) ) -> Result<()>
Evaluates the instruction.
sourcepub fn execute<A: Aleo<Network = N>>(
&self,
stack: &(impl StackMatches<N> + StackProgram<N>),
registers: &mut (impl RegistersLoadCircuit<N, A> + RegistersStoreCircuit<N, A>)
) -> Result<()>
pub fn execute<A: Aleo<Network = N>>( &self, stack: &(impl StackMatches<N> + StackProgram<N>), registers: &mut (impl RegistersLoadCircuit<N, A> + RegistersStoreCircuit<N, A>) ) -> Result<()>
Executes the instruction.
sourcepub fn finalize(
&self,
stack: &(impl StackMatches<N> + StackProgram<N>),
registers: &mut (impl RegistersLoad<N> + RegistersStore<N>)
) -> Result<()>
pub fn finalize( &self, stack: &(impl StackMatches<N> + StackProgram<N>), registers: &mut (impl RegistersLoad<N> + RegistersStore<N>) ) -> Result<()>
Finalizes the instruction.
sourcepub fn output_types(
&self,
_stack: &impl StackProgram<N>,
input_types: &[RegisterType<N>]
) -> Result<Vec<RegisterType<N>>>
pub fn output_types( &self, _stack: &impl StackProgram<N>, input_types: &[RegisterType<N>] ) -> Result<Vec<RegisterType<N>>>
Returns the output type from the given program and input types.
Trait Implementations§
source§impl<N: Clone + Network, O: Clone + Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> Clone for Literals<N, O, NUM_OPERANDS>
impl<N: Clone + Network, O: Clone + Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> Clone for Literals<N, O, NUM_OPERANDS>
source§impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> Debug for Literals<N, O, NUM_OPERANDS>
impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> Debug for Literals<N, O, NUM_OPERANDS>
source§impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> Display for Literals<N, O, NUM_OPERANDS>
impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> Display for Literals<N, O, NUM_OPERANDS>
source§impl<N: Network> From<Literals<N, AbsOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, AbsOperation<N>, 1>> for Instruction<N>
source§impl<N: Network> From<Literals<N, AbsWrappedOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, AbsWrappedOperation<N>, 1>> for Instruction<N>
source§fn from(operation: AbsWrapped<N>) -> Self
fn from(operation: AbsWrapped<N>) -> Self
Converts to this type from the input type.
source§impl<N: Network> From<Literals<N, AddOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, AddOperation<N>, 2>> for Instruction<N>
source§impl<N: Network> From<Literals<N, AddWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, AddWrappedOperation<N>, 2>> for Instruction<N>
source§fn from(operation: AddWrapped<N>) -> Self
fn from(operation: AddWrapped<N>) -> Self
Converts to this type from the input type.
source§impl<N: Network> From<Literals<N, AndOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, AndOperation<N>, 2>> for Instruction<N>
source§impl<N: Network> From<Literals<N, DivOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, DivOperation<N>, 2>> for Instruction<N>
source§impl<N: Network> From<Literals<N, DivWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, DivWrappedOperation<N>, 2>> for Instruction<N>
source§fn from(operation: DivWrapped<N>) -> Self
fn from(operation: DivWrapped<N>) -> Self
Converts to this type from the input type.
source§impl<N: Network> From<Literals<N, DoubleOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, DoubleOperation<N>, 1>> for Instruction<N>
source§impl<N: Network> From<Literals<N, GreaterThanOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, GreaterThanOperation<N>, 2>> for Instruction<N>
source§fn from(operation: GreaterThan<N>) -> Self
fn from(operation: GreaterThan<N>) -> Self
Converts to this type from the input type.
source§impl<N: Network> From<Literals<N, GreaterThanOrEqualOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, GreaterThanOrEqualOperation<N>, 2>> for Instruction<N>
source§fn from(operation: GreaterThanOrEqual<N>) -> Self
fn from(operation: GreaterThanOrEqual<N>) -> Self
Converts to this type from the input type.
source§impl<N: Network> From<Literals<N, InvOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, InvOperation<N>, 1>> for Instruction<N>
source§impl<N: Network> From<Literals<N, LessThanOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, LessThanOperation<N>, 2>> for Instruction<N>
source§impl<N: Network> From<Literals<N, LessThanOrEqualOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, LessThanOrEqualOperation<N>, 2>> for Instruction<N>
source§fn from(operation: LessThanOrEqual<N>) -> Self
fn from(operation: LessThanOrEqual<N>) -> Self
Converts to this type from the input type.
source§impl<N: Network> From<Literals<N, ModuloOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, ModuloOperation<N>, 2>> for Instruction<N>
source§impl<N: Network> From<Literals<N, MulOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, MulOperation<N>, 2>> for Instruction<N>
source§impl<N: Network> From<Literals<N, MulWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, MulWrappedOperation<N>, 2>> for Instruction<N>
source§fn from(operation: MulWrapped<N>) -> Self
fn from(operation: MulWrapped<N>) -> Self
Converts to this type from the input type.
source§impl<N: Network> From<Literals<N, NandOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, NandOperation<N>, 2>> for Instruction<N>
source§impl<N: Network> From<Literals<N, NegOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, NegOperation<N>, 1>> for Instruction<N>
source§impl<N: Network> From<Literals<N, NorOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, NorOperation<N>, 2>> for Instruction<N>
source§impl<N: Network> From<Literals<N, NotOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, NotOperation<N>, 1>> for Instruction<N>
source§impl<N: Network> From<Literals<N, OrOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, OrOperation<N>, 2>> for Instruction<N>
source§impl<N: Network> From<Literals<N, PowOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, PowOperation<N>, 2>> for Instruction<N>
source§impl<N: Network> From<Literals<N, PowWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, PowWrappedOperation<N>, 2>> for Instruction<N>
source§fn from(operation: PowWrapped<N>) -> Self
fn from(operation: PowWrapped<N>) -> Self
Converts to this type from the input type.
source§impl<N: Network> From<Literals<N, RemOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, RemOperation<N>, 2>> for Instruction<N>
source§impl<N: Network> From<Literals<N, RemWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, RemWrappedOperation<N>, 2>> for Instruction<N>
source§fn from(operation: RemWrapped<N>) -> Self
fn from(operation: RemWrapped<N>) -> Self
Converts to this type from the input type.
source§impl<N: Network> From<Literals<N, ShlOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, ShlOperation<N>, 2>> for Instruction<N>
source§impl<N: Network> From<Literals<N, ShlWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, ShlWrappedOperation<N>, 2>> for Instruction<N>
source§fn from(operation: ShlWrapped<N>) -> Self
fn from(operation: ShlWrapped<N>) -> Self
Converts to this type from the input type.
source§impl<N: Network> From<Literals<N, ShrOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, ShrOperation<N>, 2>> for Instruction<N>
source§impl<N: Network> From<Literals<N, ShrWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, ShrWrappedOperation<N>, 2>> for Instruction<N>
source§fn from(operation: ShrWrapped<N>) -> Self
fn from(operation: ShrWrapped<N>) -> Self
Converts to this type from the input type.
source§impl<N: Network> From<Literals<N, SquareOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, SquareOperation<N>, 1>> for Instruction<N>
source§impl<N: Network> From<Literals<N, SquareRootOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, SquareRootOperation<N>, 1>> for Instruction<N>
source§fn from(operation: SquareRoot<N>) -> Self
fn from(operation: SquareRoot<N>) -> Self
Converts to this type from the input type.
source§impl<N: Network> From<Literals<N, SubOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, SubOperation<N>, 2>> for Instruction<N>
source§impl<N: Network> From<Literals<N, SubWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, SubWrappedOperation<N>, 2>> for Instruction<N>
source§fn from(operation: SubWrapped<N>) -> Self
fn from(operation: SubWrapped<N>) -> Self
Converts to this type from the input type.
source§impl<N: Network> From<Literals<N, TernaryOperation<N>, 3>> for Instruction<N>
impl<N: Network> From<Literals<N, TernaryOperation<N>, 3>> for Instruction<N>
source§impl<N: Network> From<Literals<N, XorOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, XorOperation<N>, 2>> for Instruction<N>
source§impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> FromBytes for Literals<N, O, NUM_OPERANDS>
impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> FromBytes for Literals<N, O, NUM_OPERANDS>
source§impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> FromStr for Literals<N, O, NUM_OPERANDS>
impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> FromStr for Literals<N, O, NUM_OPERANDS>
source§impl<N: Hash + Network, O: Hash + Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> Hash for Literals<N, O, NUM_OPERANDS>
impl<N: Hash + Network, O: Hash + Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> Hash for Literals<N, O, NUM_OPERANDS>
source§impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> Parser for Literals<N, O, NUM_OPERANDS>
impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> Parser for Literals<N, O, NUM_OPERANDS>
source§impl<N: PartialEq + Network, O: PartialEq + Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> PartialEq for Literals<N, O, NUM_OPERANDS>
impl<N: PartialEq + Network, O: PartialEq + Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> PartialEq for Literals<N, O, NUM_OPERANDS>
source§impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> ToBytes for Literals<N, O, NUM_OPERANDS>
impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> ToBytes for Literals<N, O, NUM_OPERANDS>
impl<N: Eq + Network, O: Eq + Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> Eq for Literals<N, O, NUM_OPERANDS>
impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> StructuralEq for Literals<N, O, NUM_OPERANDS>
impl<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> StructuralPartialEq for Literals<N, O, NUM_OPERANDS>
Auto Trait Implementations§
impl<N, O, const NUM_OPERANDS: usize> RefUnwindSafe for Literals<N, O, NUM_OPERANDS>where N: RefUnwindSafe, O: RefUnwindSafe, <N as Environment>::Field: RefUnwindSafe, <N as Environment>::Projective: RefUnwindSafe, <N as Environment>::Scalar: RefUnwindSafe,
impl<N, O, const NUM_OPERANDS: usize> Send for Literals<N, O, NUM_OPERANDS>where O: Send,
impl<N, O, const NUM_OPERANDS: usize> Sync for Literals<N, O, NUM_OPERANDS>where O: Sync,
impl<N, O, const NUM_OPERANDS: usize> Unpin for Literals<N, O, NUM_OPERANDS>where N: Unpin, O: Unpin, <N as Environment>::Field: Unpin, <N as Environment>::Projective: Unpin, <N as Environment>::Scalar: Unpin,
impl<N, O, const NUM_OPERANDS: usize> UnwindSafe for Literals<N, O, NUM_OPERANDS>where N: UnwindSafe, O: UnwindSafe, <N as Environment>::Field: UnwindSafe, <N as Environment>::Projective: UnwindSafe, <N as Environment>::Scalar: 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
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.