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
sourceimpl<N: Network, Private: Visibility> Balance<N, Private>
impl<N: Network, Private: Visibility> Balance<N, Private>
sourceimpl<N: Network> Balance<N, Plaintext<N>>
impl<N: Network> Balance<N, Plaintext<N>>
sourcepub fn encrypt_with_randomizer(
&self,
randomizer: &[Field<N>]
) -> Result<Balance<N, Ciphertext<N>>>
pub fn encrypt_with_randomizer(
&self,
randomizer: &[Field<N>]
) -> Result<Balance<N, Ciphertext<N>>>
Encrypts the balance under the given randomizer.
sourceimpl<N: Network> Balance<N, Ciphertext<N>>
impl<N: Network> Balance<N, Ciphertext<N>>
Trait Implementations
sourceimpl<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>
sourceimpl<N: Network, Private: Visibility> FromBytes for Balance<N, Private>
impl<N: Network, Private: Visibility> FromBytes for Balance<N, Private>
sourceimpl<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>
sourceimpl<N: Network> ToBits for Balance<N, Ciphertext<N>>
impl<N: Network> ToBits for Balance<N, Ciphertext<N>>
sourceimpl<N: Network> ToBits for Balance<N, Plaintext<N>>
impl<N: Network> ToBits for Balance<N, Plaintext<N>>
sourceimpl<N: Network, Private: Visibility> ToBytes for Balance<N, Private>
impl<N: Network, Private: Visibility> ToBytes for Balance<N, Private>
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.