pub enum Owner<N: Network, Private: Visibility> {
Public(Address<N>),
Private(Private),
}
Expand description
A value stored in program data.
Variants§
Public(Address<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> Owner<N, Private>
impl<N: Network, Private: Visibility> Owner<N, Private>
Methods from Deref<Target = Group<E>>§
Sourcepub fn to_x_coordinate(&self) -> Field<E>
pub fn to_x_coordinate(&self) -> Field<E>
Returns the x-coordinate in the affine coordinates of the group.
Sourcepub fn to_xy_coordinates(&self) -> (Field<E>, Field<E>)
pub fn to_xy_coordinates(&self) -> (Field<E>, Field<E>)
Returns the x-coordinate and y-coordinate in the affine coordinates of the group.
Sourcepub fn to_y_coordinate(&self) -> Field<E>
pub fn to_y_coordinate(&self) -> Field<E>
Returns the y-coordinate in the affine coordinates of the group.
pub const EDWARDS_A: Field<E> = _
pub const EDWARDS_D: Field<E> = _
pub const MONTGOMERY_A: Field<E> = _
pub const MONTGOMERY_B: Field<E> = _
Sourcepub fn mul_by_cofactor(&self) -> Group<E>
pub fn mul_by_cofactor(&self) -> Group<E>
Returns self * COFACTOR
.
Sourcepub fn div_by_cofactor(&self) -> Group<E>
pub fn div_by_cofactor(&self) -> Group<E>
Returns self / COFACTOR
.
Trait Implementations§
Source§impl<N: Network> ToBits for Owner<N, Ciphertext<N>>
impl<N: Network> ToBits for Owner<N, Ciphertext<N>>
Source§fn write_bits_le(&self, vec: &mut Vec<bool>)
fn write_bits_le(&self, vec: &mut Vec<bool>)
Returns self
as a boolean vector in little-endian order.
Source§fn write_bits_be(&self, vec: &mut Vec<bool>)
fn write_bits_be(&self, vec: &mut Vec<bool>)
Returns self
as a boolean vector in big-endian order.
Source§fn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
Returns
self
as a boolean array in little-endian order.Source§fn to_bits_be(&self) -> Vec<bool>
fn to_bits_be(&self) -> Vec<bool>
Returns
self
as a boolean array in big-endian order.Source§impl<N: Network> ToBits for Owner<N, Plaintext<N>>
impl<N: Network> ToBits for Owner<N, Plaintext<N>>
Source§fn write_bits_le(&self, vec: &mut Vec<bool>)
fn write_bits_le(&self, vec: &mut Vec<bool>)
Returns self
as a boolean vector in little-endian order.
Source§fn write_bits_be(&self, vec: &mut Vec<bool>)
fn write_bits_be(&self, vec: &mut Vec<bool>)
Returns self
as a boolean vector in big-endian order.
Source§fn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
Returns
self
as a boolean array in little-endian order.Source§fn to_bits_be(&self) -> Vec<bool>
fn to_bits_be(&self) -> Vec<bool>
Returns
self
as a boolean array in big-endian order.impl<N: Network, Private: Visibility<Boolean = Boolean<N>>> Eq for Owner<N, Private>
Auto Trait Implementations§
impl<N, Private> Freeze for Owner<N, Private>
impl<N, Private> RefUnwindSafe for Owner<N, Private>
impl<N, Private> Send for Owner<N, Private>where
Private: Send,
impl<N, Private> Sync for Owner<N, Private>where
Private: Sync,
impl<N, Private> Unpin for Owner<N, Private>
impl<N, Private> UnwindSafe for Owner<N, Private>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 more