Struct snarkvm_synthesizer_program::Cast
source · pub struct Cast<N: Network> { /* private fields */ }
Expand description
Casts the operands into the declared type.
Implementations§
source§impl<N: Network> Cast<N>
impl<N: Network> Cast<N>
sourcepub fn destinations(&self) -> Vec<Register<N>>
pub fn destinations(&self) -> Vec<Register<N>>
Returns the destination register.
sourcepub fn register_type(&self) -> &RegisterType<N>
pub fn register_type(&self) -> &RegisterType<N>
Returns the register type.
source§impl<N: Network> Cast<N>
impl<N: Network> Cast<N>
sourcepub fn evaluate(
&self,
stack: &impl StackMatches<N> + StackProgram<N>,
registers: &mut impl RegistersCaller<N> + RegistersLoad<N> + RegistersStore<N>
) -> Result<()>
pub fn evaluate( &self, stack: &impl StackMatches<N> + StackProgram<N>, registers: &mut impl RegistersCaller<N> + 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 RegistersCallerCircuit<N, A> + RegistersLoadCircuit<N, A> + RegistersStoreCircuit<N, A>
) -> Result<()>
pub fn execute<A: Aleo<Network = N>>( &self, stack: &impl StackMatches<N> + StackProgram<N>, registers: &mut impl RegistersCallerCircuit<N, A> + 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: Network> From<Cast<N>> for Instruction<N>
impl<N: Network> From<Cast<N>> for Instruction<N>
source§impl<N: PartialEq + Network> PartialEq<Cast<N>> for Cast<N>
impl<N: PartialEq + Network> PartialEq<Cast<N>> for Cast<N>
impl<N: Eq + Network> Eq for Cast<N>
impl<N: Network> StructuralEq for Cast<N>
impl<N: Network> StructuralPartialEq for Cast<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for Cast<N>where N: RefUnwindSafe, <N as Environment>::Field: RefUnwindSafe, <N as Environment>::Projective: RefUnwindSafe, <N as Environment>::Scalar: RefUnwindSafe,
impl<N> Send for Cast<N>
impl<N> Sync for Cast<N>
impl<N> Unpin for Cast<N>where N: Unpin, <N as Environment>::Field: Unpin, <N as Environment>::Projective: Unpin, <N as Environment>::Scalar: Unpin,
impl<N> UnwindSafe for Cast<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
source§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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.