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§fn parse(string: &str) -> ParserResult<'_, Self>
fn parse(string: &str) -> ParserResult<'_, Self>
Parses a string into an operation.
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> StructuralPartialEq for Literals<N, O, NUM_OPERANDS>
Auto Trait Implementations§
impl<N, O, const NUM_OPERANDS: usize> Freeze for Literals<N, O, NUM_OPERANDS>
impl<N, O, const NUM_OPERANDS: usize> RefUnwindSafe for Literals<N, O, NUM_OPERANDS>where
O: RefUnwindSafe,
<N as Environment>::Field: RefUnwindSafe,
<N as Environment>::Projective: RefUnwindSafe,
<N as Environment>::Scalar: RefUnwindSafe,
N: 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
O: Unpin,
<N as Environment>::Field: Unpin,
<N as Environment>::Projective: Unpin,
<N as Environment>::Scalar: Unpin,
N: Unpin,
impl<N, O, const NUM_OPERANDS: usize> UnwindSafe for Literals<N, O, NUM_OPERANDS>where
O: UnwindSafe,
<N as Environment>::Field: UnwindSafe,
<N as Environment>::Projective: UnwindSafe,
<N as Environment>::Scalar: UnwindSafe,
N: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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