Struct snarkvm_synthesizer::prelude::FinalizeTypes
source · pub struct FinalizeTypes<N>where
N: Network,{ /* private fields */ }
Implementations§
source§impl<N> FinalizeTypes<N>where
N: Network,
impl<N> FinalizeTypes<N>where N: Network,
sourcepub fn matches_struct(
&self,
stack: &(impl StackMatches<N> + StackProgram<N>),
operands: &[Operand<N>],
struct_: &StructType<N>
) -> Result<(), Error>
pub fn matches_struct( &self, stack: &(impl StackMatches<N> + StackProgram<N>), operands: &[Operand<N>], struct_: &StructType<N> ) -> Result<(), Error>
Checks that the given operands matches the layout of the struct. The ordering of the operands matters.
sourcepub fn matches_array(
&self,
stack: &(impl StackMatches<N> + StackProgram<N>),
operands: &[Operand<N>],
array_type: &ArrayType<N>
) -> Result<(), Error>
pub fn matches_array( &self, stack: &(impl StackMatches<N> + StackProgram<N>), operands: &[Operand<N>], array_type: &ArrayType<N> ) -> Result<(), Error>
Checks that the given operands matches the layout of the array.
source§impl<N> FinalizeTypes<N>where
N: Network,
impl<N> FinalizeTypes<N>where N: Network,
sourcepub fn from_finalize(
stack: &(impl StackMatches<N> + StackProgram<N>),
finalize: &FinalizeCore<N, Command<N>>
) -> Result<FinalizeTypes<N>, Error>
pub fn from_finalize( stack: &(impl StackMatches<N> + StackProgram<N>), finalize: &FinalizeCore<N, Command<N>> ) -> Result<FinalizeTypes<N>, Error>
Initializes a new instance of FinalizeTypes
for the given finalize.
Checks that the given finalize is well-formed for the given stack.
sourcepub fn contains(&self, register: &Register<N>) -> bool
pub fn contains(&self, register: &Register<N>) -> bool
Returns true
if the given register exists.
sourcepub fn is_input(&self, register: &Register<N>) -> bool
pub fn is_input(&self, register: &Register<N>) -> bool
Returns true
if the given register corresponds to an input register.
sourcepub fn get_type_from_operand(
&self,
stack: &(impl StackMatches<N> + StackProgram<N>),
operand: &Operand<N>
) -> Result<FinalizeType<N>, Error>
pub fn get_type_from_operand( &self, stack: &(impl StackMatches<N> + StackProgram<N>), operand: &Operand<N> ) -> Result<FinalizeType<N>, Error>
Returns the type of the given operand.
sourcepub fn get_type(
&self,
stack: &(impl StackMatches<N> + StackProgram<N>),
register: &Register<N>
) -> Result<FinalizeType<N>, Error>
pub fn get_type( &self, stack: &(impl StackMatches<N> + StackProgram<N>), register: &Register<N> ) -> Result<FinalizeType<N>, Error>
Returns the type of the given register.
Trait Implementations§
source§impl<N> Clone for FinalizeTypes<N>where
N: Clone + Network,
impl<N> Clone for FinalizeTypes<N>where N: Clone + Network,
source§fn clone(&self) -> FinalizeTypes<N>
fn clone(&self) -> FinalizeTypes<N>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<N> Default for FinalizeTypes<N>where
N: Default + Network,
impl<N> Default for FinalizeTypes<N>where N: Default + Network,
source§fn default() -> FinalizeTypes<N>
fn default() -> FinalizeTypes<N>
Returns the “default value” for a type. Read more
source§impl<N> PartialEq for FinalizeTypes<N>where
N: PartialEq + Network,
impl<N> PartialEq for FinalizeTypes<N>where N: PartialEq + Network,
source§fn eq(&self, other: &FinalizeTypes<N>) -> bool
fn eq(&self, other: &FinalizeTypes<N>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<N> Eq for FinalizeTypes<N>where N: Eq + Network,
impl<N> StructuralEq for FinalizeTypes<N>where N: Network,
impl<N> StructuralPartialEq for FinalizeTypes<N>where N: Network,
Auto Trait Implementations§
impl<N> RefUnwindSafe for FinalizeTypes<N>where N: RefUnwindSafe, <N as Environment>::Field: RefUnwindSafe,
impl<N> Send for FinalizeTypes<N>
impl<N> Sync for FinalizeTypes<N>
impl<N> Unpin for FinalizeTypes<N>where N: Unpin, <N as Environment>::Field: Unpin,
impl<N> UnwindSafe for FinalizeTypes<N>where N: UnwindSafe, <N as Environment>::Field: 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.