pub struct GetOrUseDynamic<N: Network> { /* private fields */ }Expand description
A dynamic get.or_use command that uses the provided default in case of failure, e.g. get.or_use.dynamic r0 r1 r2[r3] r4 into r5 as boolean;.
Resolves the program and mapping operands, gets the value stored at the key operand in mapping, and stores the result into destination.
If the key is not present, default is stored in destination.
Implementations§
Source§impl<N: Network> GetOrUseDynamic<N>
impl<N: Network> GetOrUseDynamic<N>
Sourcepub const fn program_name_operand(&self) -> &Operand<N>
pub const fn program_name_operand(&self) -> &Operand<N>
Returns the operand containing the program name.
Sourcepub const fn program_network_operand(&self) -> &Operand<N>
pub const fn program_network_operand(&self) -> &Operand<N>
Returns the operand containing the program network.
Sourcepub const fn mapping_name_operand(&self) -> &Operand<N>
pub const fn mapping_name_operand(&self) -> &Operand<N>
Returns the operand containing the mapping name.
Sourcepub const fn key_operand(&self) -> &Operand<N>
pub const fn key_operand(&self) -> &Operand<N>
Returns the operand containing the key.
Sourcepub const fn default_operand(&self) -> &Operand<N>
pub const fn default_operand(&self) -> &Operand<N>
Returns the operand containing the default value.
Sourcepub const fn destination(&self) -> &Register<N>
pub const fn destination(&self) -> &Register<N>
Returns the destination register.
Sourcepub const fn destination_type(&self) -> &PlaintextType<N>
pub const fn destination_type(&self) -> &PlaintextType<N>
Returns the destination type.
Source§impl<N: Network> GetOrUseDynamic<N>
impl<N: Network> GetOrUseDynamic<N>
Sourcepub fn finalize(
&self,
stack: &impl StackTrait<N>,
store: &impl FinalizeStoreTrait<N>,
registers: &mut impl RegistersTrait<N>,
) -> Result<()>
pub fn finalize( &self, stack: &impl StackTrait<N>, store: &impl FinalizeStoreTrait<N>, registers: &mut impl RegistersTrait<N>, ) -> Result<()>
Finalizes the command.
Trait Implementations§
Source§impl<N: Clone + Network> Clone for GetOrUseDynamic<N>
impl<N: Clone + Network> Clone for GetOrUseDynamic<N>
Source§fn clone(&self) -> GetOrUseDynamic<N>
fn clone(&self) -> GetOrUseDynamic<N>
Returns a duplicate 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: Network> Debug for GetOrUseDynamic<N>
impl<N: Network> Debug for GetOrUseDynamic<N>
Source§impl<N: Network> Display for GetOrUseDynamic<N>
impl<N: Network> Display for GetOrUseDynamic<N>
Source§impl<N: Network> FromBytes for GetOrUseDynamic<N>
impl<N: Network> FromBytes for GetOrUseDynamic<N>
Source§fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
Returns
Self from a byte array in little-endian order.Source§fn from_bytes_le_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_le_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
Same behavior as
Self::from_bytes_le but avoids costly checks.
This shall only be called when deserializing from a trusted source, such as local storage. Read moreSource§fn read_le_unchecked<R>(reader: R) -> Result<Self, Error>
fn read_le_unchecked<R>(reader: R) -> Result<Self, Error>
Same behavior as
Self::read_le but avoids costly checks.
This shall only be called when deserializing from a trusted source, such as local storage. Read moreSource§impl<N: Network> FromStr for GetOrUseDynamic<N>
impl<N: Network> FromStr for GetOrUseDynamic<N>
Source§impl<N: Network> Parser for GetOrUseDynamic<N>
impl<N: Network> Parser for GetOrUseDynamic<N>
Source§fn parse(string: &str) -> ParserResult<'_, Self>
fn parse(string: &str) -> ParserResult<'_, Self>
Parses a string into an operation.
Source§impl<N: Network> ToBytes for GetOrUseDynamic<N>
impl<N: Network> ToBytes for GetOrUseDynamic<N>
impl<N: Eq + Network> Eq for GetOrUseDynamic<N>
impl<N: Network> StructuralPartialEq for GetOrUseDynamic<N>
Auto Trait Implementations§
impl<N> Freeze for GetOrUseDynamic<N>where
<N as Environment>::Field: Freeze,
<N as Environment>::Projective: Freeze,
<N as Environment>::Scalar: Freeze,
impl<N> RefUnwindSafe for GetOrUseDynamic<N>where
<N as Environment>::Field: RefUnwindSafe,
<N as Environment>::Projective: RefUnwindSafe,
<N as Environment>::Scalar: RefUnwindSafe,
N: RefUnwindSafe,
impl<N> Send for GetOrUseDynamic<N>
impl<N> Sync for GetOrUseDynamic<N>
impl<N> Unpin for GetOrUseDynamic<N>where
<N as Environment>::Field: Unpin,
<N as Environment>::Projective: Unpin,
<N as Environment>::Scalar: Unpin,
N: Unpin,
impl<N> UnsafeUnpin for GetOrUseDynamic<N>where
<N as Environment>::Field: UnsafeUnpin,
<N as Environment>::Projective: UnsafeUnpin,
<N as Environment>::Scalar: UnsafeUnpin,
impl<N> UnwindSafe for GetOrUseDynamic<N>where
<N as Environment>::Field: UnwindSafe,
<N as Environment>::Projective: UnwindSafe,
<N as Environment>::Scalar: UnwindSafe,
N: 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.