Enum snarkvm_console_program::Balance
source · pub enum Balance<N: Network, Private: Visibility> {
Public(U64<N>),
Private(Private),
}
Expand description
A value stored in program data.
Variants§
Public(U64<N>)
A publicly-visible value.
Private(Private)
A private value is encrypted under the account owner’s address.
Implementations§
source§impl<N: Network, Private: Visibility> Balance<N, Private>
impl<N: Network, Private: Visibility> Balance<N, Private>
Trait Implementations§
source§impl<N: Network, Private: Visibility<Boolean = Boolean<N>>> Equal<Balance<N, Private>> for Balance<N, Private>
impl<N: Network, Private: Visibility<Boolean = Boolean<N>>> Equal<Balance<N, Private>> for Balance<N, Private>
source§impl<N: Network, Private: Visibility<Boolean = Boolean<N>>> PartialEq<Balance<N, Private>> for Balance<N, Private>
impl<N: Network, Private: Visibility<Boolean = Boolean<N>>> PartialEq<Balance<N, Private>> for Balance<N, Private>
source§impl<N: Network> ToBits for Balance<N, Ciphertext<N>>
impl<N: Network> ToBits for Balance<N, Ciphertext<N>>
source§fn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
Returns self
as a boolean vector in little-endian order.
source§fn to_bits_be(&self) -> Vec<bool>
fn to_bits_be(&self) -> Vec<bool>
Returns self
as a boolean vector in big-endian order.
source§impl<N: Network> ToBits for Balance<N, Plaintext<N>>
impl<N: Network> ToBits for Balance<N, Plaintext<N>>
source§fn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
Returns self
as a boolean vector in little-endian order.
source§fn to_bits_be(&self) -> Vec<bool>
fn to_bits_be(&self) -> Vec<bool>
Returns self
as a boolean vector in big-endian order.
impl<N: Network, Private: Visibility<Boolean = Boolean<N>>> Eq for Balance<N, Private>
Auto Trait Implementations§
impl<N, Private> RefUnwindSafe for Balance<N, Private>where N: RefUnwindSafe, Private: RefUnwindSafe,
impl<N, Private> Send for Balance<N, Private>where Private: Send,
impl<N, Private> Sync for Balance<N, Private>where Private: Sync,
impl<N, Private> Unpin for Balance<N, Private>where N: Unpin, Private: Unpin,
impl<N, Private> UnwindSafe for Balance<N, Private>where N: UnwindSafe, Private: UnwindSafe,
Blanket Implementations§
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.§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