Struct snarkvm_synthesizer_program::logic::command::Contains
source · pub struct Contains<N: Network> { /* private fields */ }
Expand description
A contains command, e.g. contains accounts[r0] into r1;
.
Contains is true
if a (key
, value
) entry exists in mapping
, stores the result in destination
.
Implementations§
source§impl<N: Network> Contains<N>
impl<N: Network> Contains<N>
sourcepub const fn mapping_name(&self) -> &Identifier<N>
pub const fn mapping_name(&self) -> &Identifier<N>
Returns the mapping name.
sourcepub const fn destination(&self) -> &Register<N>
pub const fn destination(&self) -> &Register<N>
Returns the destination register.
source§impl<N: Network> Contains<N>
impl<N: Network> Contains<N>
sourcepub fn finalize(
&self,
stack: &(impl StackMatches<N> + StackProgram<N>),
store: &impl FinalizeStoreTrait<N>,
registers: &mut (impl RegistersLoad<N> + RegistersStore<N>)
) -> Result<()>
pub fn finalize( &self, stack: &(impl StackMatches<N> + StackProgram<N>), store: &impl FinalizeStoreTrait<N>, registers: &mut (impl RegistersLoad<N> + RegistersStore<N>) ) -> Result<()>
Finalizes the command.
Trait Implementations§
source§impl<N: PartialEq + Network> PartialEq for Contains<N>
impl<N: PartialEq + Network> PartialEq for Contains<N>
impl<N: Eq + Network> Eq for Contains<N>
impl<N: Network> StructuralEq for Contains<N>
impl<N: Network> StructuralPartialEq for Contains<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for Contains<N>where N: RefUnwindSafe, <N as Environment>::Field: RefUnwindSafe, <N as Environment>::Projective: RefUnwindSafe, <N as Environment>::Scalar: RefUnwindSafe,
impl<N> Send for Contains<N>
impl<N> Sync for Contains<N>
impl<N> Unpin for Contains<N>where N: Unpin, <N as Environment>::Field: Unpin, <N as Environment>::Projective: Unpin, <N as Environment>::Scalar: Unpin,
impl<N> UnwindSafe for Contains<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.