Struct snarkvm_synthesizer_program::logic::instruction::Call
source · pub struct Call<N: Network> { /* private fields */ }
Expand description
Calls the operands into the declared type.
i.e. call transfer r0.owner 0u64 r1.amount into r1 r2;
Implementations§
source§impl<N: Network> Call<N>
impl<N: Network> Call<N>
sourcepub const fn operator(&self) -> &CallOperator<N>
pub const fn operator(&self) -> &CallOperator<N>
Return the operator.
sourcepub fn destinations(&self) -> Vec<Register<N>>
pub fn destinations(&self) -> Vec<Register<N>>
Returns the destination registers.
source§impl<N: Network> Call<N>
impl<N: Network> Call<N>
sourcepub fn is_function_call(&self, stack: &impl StackProgram<N>) -> Result<bool>
pub fn is_function_call(&self, stack: &impl StackProgram<N>) -> Result<bool>
Returns true
if the instruction is a function call.
sourcepub fn evaluate(
&self,
_stack: &impl StackProgram<N>,
_registers: &mut impl RegistersLoad<N>
) -> Result<()>
pub fn evaluate( &self, _stack: &impl StackProgram<N>, _registers: &mut impl RegistersLoad<N> ) -> Result<()>
Evaluates the instruction.
sourcepub fn execute<A: Aleo<Network = N>>(
&self,
_stack: &impl StackProgram<N>,
_registers: &mut impl RegistersLoadCircuit<N, A>
) -> Result<()>
pub fn execute<A: Aleo<Network = N>>( &self, _stack: &impl StackProgram<N>, _registers: &mut impl RegistersLoadCircuit<N, A> ) -> Result<()>
Executes the instruction.
sourcepub fn finalize(
&self,
_stack: &(impl StackMatches<N> + StackProgram<N>),
_registers: &mut impl RegistersLoad<N>
) -> Result<()>
pub fn finalize( &self, _stack: &(impl StackMatches<N> + StackProgram<N>), _registers: &mut impl RegistersLoad<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: Network> From<Call<N>> for Instruction<N>
impl<N: Network> From<Call<N>> for Instruction<N>
source§impl<N: PartialEq + Network> PartialEq for Call<N>
impl<N: PartialEq + Network> PartialEq for Call<N>
impl<N: Eq + Network> Eq for Call<N>
impl<N: Network> StructuralEq for Call<N>
impl<N: Network> StructuralPartialEq for Call<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for Call<N>where N: RefUnwindSafe, <N as Environment>::Field: RefUnwindSafe, <N as Environment>::Projective: RefUnwindSafe, <N as Environment>::Scalar: RefUnwindSafe,
impl<N> Send for Call<N>
impl<N> Sync for Call<N>
impl<N> Unpin for Call<N>where N: Unpin, <N as Environment>::Field: Unpin, <N as Environment>::Projective: Unpin, <N as Environment>::Scalar: Unpin,
impl<N> UnwindSafe for Call<N>where N: 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.