Struct snarkvm_compiler::Literals
source · [−]pub struct Literals<N: Network, O: Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> { /* private fields */ }
Implementations
sourceimpl<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>
sourceimpl<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<A: Aleo<Network = N>>(
&self,
stack: &Stack<N>,
registers: &mut Registers<N, A>
) -> Result<()>
pub fn evaluate<A: Aleo<Network = N>>(
&self,
stack: &Stack<N>,
registers: &mut Registers<N, A>
) -> Result<()>
Evaluates the instruction.
sourcepub fn execute<A: Aleo<Network = N>>(
&self,
stack: &Stack<N>,
registers: &mut Registers<N, A>
) -> Result<()>
pub fn execute<A: Aleo<Network = N>>(
&self,
stack: &Stack<N>,
registers: &mut Registers<N, A>
) -> Result<()>
Executes the instruction.
sourcepub fn output_types(
&self,
_stack: &Stack<N>,
input_types: &[RegisterType<N>]
) -> Result<Vec<RegisterType<N>>>
pub fn output_types(
&self,
_stack: &Stack<N>,
input_types: &[RegisterType<N>]
) -> Result<Vec<RegisterType<N>>>
Returns the output type from the given program and input types.
Trait Implementations
sourceimpl<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>
sourceimpl<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>
sourceimpl<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>
sourceimpl<N: Network> From<Literals<N, AbsOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, AbsOperation<N>, 1>> for Instruction<N>
sourceimpl<N: Network> From<Literals<N, AbsWrappedOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, AbsWrappedOperation<N>, 1>> for Instruction<N>
sourcefn from(operation: UnaryLiteral<N, AbsWrappedOperation<N>>) -> Self
fn from(operation: UnaryLiteral<N, AbsWrappedOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, AddOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, AddOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, AddOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, AddOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, AddWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, AddWrappedOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, AddWrappedOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, AddWrappedOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, AndOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, AndOperation<N>, 2>> for Instruction<N>
sourceimpl<N: Network> From<Literals<N, DivOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, DivOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, DivOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, DivOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, DivWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, DivWrappedOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, DivWrappedOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, DivWrappedOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, DoubleOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, DoubleOperation<N>, 1>> for Instruction<N>
sourcefn from(operation: UnaryLiteral<N, DoubleOperation<N>>) -> Self
fn from(operation: UnaryLiteral<N, DoubleOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, GreaterThanOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, GreaterThanOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: GreaterThan<N>) -> Self
fn from(operation: GreaterThan<N>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, GreaterThanOrEqualOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, GreaterThanOrEqualOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: GreaterThanOrEqual<N>) -> Self
fn from(operation: GreaterThanOrEqual<N>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, InvOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, InvOperation<N>, 1>> for Instruction<N>
sourceimpl<N: Network> From<Literals<N, LessThanOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, LessThanOperation<N>, 2>> for Instruction<N>
sourceimpl<N: Network> From<Literals<N, LessThanOrEqualOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, LessThanOrEqualOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: LessThanOrEqual<N>) -> Self
fn from(operation: LessThanOrEqual<N>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, ModuloOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, ModuloOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, ModuloOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, ModuloOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, MulOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, MulOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, MulOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, MulOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, MulWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, MulWrappedOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, MulWrappedOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, MulWrappedOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, NandOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, NandOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, NandOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, NandOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, NegOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, NegOperation<N>, 1>> for Instruction<N>
sourcefn from(operation: UnaryLiteral<N, NegOperation<N>>) -> Self
fn from(operation: UnaryLiteral<N, NegOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, NorOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, NorOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, NorOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, NorOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, NotOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, NotOperation<N>, 1>> for Instruction<N>
sourcefn from(operation: UnaryLiteral<N, NotOperation<N>>) -> Self
fn from(operation: UnaryLiteral<N, NotOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, OrOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, OrOperation<N>, 2>> for Instruction<N>
sourceimpl<N: Network> From<Literals<N, PowOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, PowOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, PowOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, PowOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, PowWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, PowWrappedOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, PowWrappedOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, PowWrappedOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, RemOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, RemOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, RemOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, RemOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, RemWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, RemWrappedOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, RemWrappedOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, RemWrappedOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, ShlOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, ShlOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, ShlOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, ShlOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, ShlWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, ShlWrappedOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, ShlWrappedOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, ShlWrappedOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, ShrOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, ShrOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, ShrOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, ShrOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, ShrWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, ShrWrappedOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, ShrWrappedOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, ShrWrappedOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, SquareOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, SquareOperation<N>, 1>> for Instruction<N>
sourcefn from(operation: UnaryLiteral<N, SquareOperation<N>>) -> Self
fn from(operation: UnaryLiteral<N, SquareOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, SquareRootOperation<N>, 1>> for Instruction<N>
impl<N: Network> From<Literals<N, SquareRootOperation<N>, 1>> for Instruction<N>
sourcefn from(operation: UnaryLiteral<N, SquareRootOperation<N>>) -> Self
fn from(operation: UnaryLiteral<N, SquareRootOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, SubOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, SubOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, SubOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, SubOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, SubWrappedOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, SubWrappedOperation<N>, 2>> for Instruction<N>
sourcefn from(operation: BinaryLiteral<N, SubWrappedOperation<N>>) -> Self
fn from(operation: BinaryLiteral<N, SubWrappedOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, TernaryOperation<N>, 3>> for Instruction<N>
impl<N: Network> From<Literals<N, TernaryOperation<N>, 3>> for Instruction<N>
sourcefn from(operation: TernaryLiteral<N, TernaryOperation<N>>) -> Self
fn from(operation: TernaryLiteral<N, TernaryOperation<N>>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<Literals<N, XorOperation<N>, 2>> for Instruction<N>
impl<N: Network> From<Literals<N, XorOperation<N>, 2>> for Instruction<N>
sourceimpl<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>
sourceimpl<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>
sourceimpl<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>
sourceimpl<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>
sourceimpl<N: PartialEq + Network, O: PartialEq + Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> PartialEq<Literals<N, O, NUM_OPERANDS>> for Literals<N, O, NUM_OPERANDS>
impl<N: PartialEq + Network, O: PartialEq + Operation<N, Literal<N>, LiteralType, NUM_OPERANDS>, const NUM_OPERANDS: usize> PartialEq<Literals<N, O, NUM_OPERANDS>> for Literals<N, O, NUM_OPERANDS>
sourceimpl<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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more