Struct snarkvm_compiler::CommitInstruction
source · [−]pub struct CommitInstruction<N: Network, const VARIANT: u8> { /* private fields */ }
Expand description
Commits the operand into the declared type.
Implementations
sourceimpl<N: Network, const VARIANT: u8> CommitInstruction<N, VARIANT>
impl<N: Network, const VARIANT: u8> CommitInstruction<N, VARIANT>
sourceimpl<N: Network, const VARIANT: u8> CommitInstruction<N, VARIANT>
impl<N: Network, const VARIANT: u8> CommitInstruction<N, VARIANT>
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, const VARIANT: u8> Clone for CommitInstruction<N, VARIANT>
impl<N: Clone + Network, const VARIANT: u8> Clone for CommitInstruction<N, VARIANT>
sourcefn clone(&self) -> CommitInstruction<N, VARIANT>
fn clone(&self) -> CommitInstruction<N, VARIANT>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<N: Network, const VARIANT: u8> Debug for CommitInstruction<N, VARIANT>
impl<N: Network, const VARIANT: u8> Debug for CommitInstruction<N, VARIANT>
sourceimpl<N: Network, const VARIANT: u8> Display for CommitInstruction<N, VARIANT>
impl<N: Network, const VARIANT: u8> Display for CommitInstruction<N, VARIANT>
sourceimpl<N: Network> From<CommitInstruction<N, { Committer::BHP1024 as u8 }>> for Instruction<N>
impl<N: Network> From<CommitInstruction<N, { Committer::BHP1024 as u8 }>> for Instruction<N>
sourcefn from(operation: CommitBHP1024<N>) -> Self
fn from(operation: CommitBHP1024<N>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<CommitInstruction<N, { Committer::BHP256 as u8 }>> for Instruction<N>
impl<N: Network> From<CommitInstruction<N, { Committer::BHP256 as u8 }>> for Instruction<N>
sourcefn from(operation: CommitBHP256<N>) -> Self
fn from(operation: CommitBHP256<N>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<CommitInstruction<N, { Committer::BHP512 as u8 }>> for Instruction<N>
impl<N: Network> From<CommitInstruction<N, { Committer::BHP512 as u8 }>> for Instruction<N>
sourcefn from(operation: CommitBHP512<N>) -> Self
fn from(operation: CommitBHP512<N>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<CommitInstruction<N, { Committer::BHP768 as u8 }>> for Instruction<N>
impl<N: Network> From<CommitInstruction<N, { Committer::BHP768 as u8 }>> for Instruction<N>
sourcefn from(operation: CommitBHP768<N>) -> Self
fn from(operation: CommitBHP768<N>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<CommitInstruction<N, { Committer::PED128 as u8 }>> for Instruction<N>
impl<N: Network> From<CommitInstruction<N, { Committer::PED128 as u8 }>> for Instruction<N>
sourcefn from(operation: CommitPED128<N>) -> Self
fn from(operation: CommitPED128<N>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network> From<CommitInstruction<N, { Committer::PED64 as u8 }>> for Instruction<N>
impl<N: Network> From<CommitInstruction<N, { Committer::PED64 as u8 }>> for Instruction<N>
sourcefn from(operation: CommitPED64<N>) -> Self
fn from(operation: CommitPED64<N>) -> Self
Converts to this type from the input type.
sourceimpl<N: Network, const VARIANT: u8> FromBytes for CommitInstruction<N, VARIANT>
impl<N: Network, const VARIANT: u8> FromBytes for CommitInstruction<N, VARIANT>
sourceimpl<N: Network, const VARIANT: u8> FromStr for CommitInstruction<N, VARIANT>
impl<N: Network, const VARIANT: u8> FromStr for CommitInstruction<N, VARIANT>
sourceimpl<N: Hash + Network, const VARIANT: u8> Hash for CommitInstruction<N, VARIANT>
impl<N: Hash + Network, const VARIANT: u8> Hash for CommitInstruction<N, VARIANT>
sourceimpl<N: Network, const VARIANT: u8> Parser for CommitInstruction<N, VARIANT>
impl<N: Network, const VARIANT: u8> Parser for CommitInstruction<N, VARIANT>
sourceimpl<N: PartialEq + Network, const VARIANT: u8> PartialEq<CommitInstruction<N, VARIANT>> for CommitInstruction<N, VARIANT>
impl<N: PartialEq + Network, const VARIANT: u8> PartialEq<CommitInstruction<N, VARIANT>> for CommitInstruction<N, VARIANT>
sourcefn eq(&self, other: &CommitInstruction<N, VARIANT>) -> bool
fn eq(&self, other: &CommitInstruction<N, VARIANT>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl<N: Network, const VARIANT: u8> ToBytes for CommitInstruction<N, VARIANT>
impl<N: Network, const VARIANT: u8> ToBytes for CommitInstruction<N, VARIANT>
impl<N: Eq + Network, const VARIANT: u8> Eq for CommitInstruction<N, VARIANT>
impl<N: Network, const VARIANT: u8> StructuralEq for CommitInstruction<N, VARIANT>
impl<N: Network, const VARIANT: u8> StructuralPartialEq for CommitInstruction<N, VARIANT>
Auto Trait Implementations
impl<N, const VARIANT: u8> RefUnwindSafe for CommitInstruction<N, VARIANT> where
N: RefUnwindSafe,
<N as Environment>::Field: RefUnwindSafe,
<N as Environment>::Projective: RefUnwindSafe,
<N as Environment>::Scalar: RefUnwindSafe,
impl<N, const VARIANT: u8> Send for CommitInstruction<N, VARIANT>
impl<N, const VARIANT: u8> Sync for CommitInstruction<N, VARIANT>
impl<N, const VARIANT: u8> Unpin for CommitInstruction<N, VARIANT> where
N: Unpin,
<N as Environment>::Field: Unpin,
<N as Environment>::Projective: Unpin,
<N as Environment>::Scalar: Unpin,
impl<N, const VARIANT: u8> UnwindSafe for CommitInstruction<N, VARIANT> where
N: 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