pub enum Owner<A: Aleo, Private: Visibility<A>> {
Public(Address<A>),
Private(Private),
}
Expand description
A value stored in program data.
Variants§
Public(Address<A>)
A publicly-visible value.
Private(Private)
A private value is encrypted under the account owner’s address.
Implementations§
Source§impl<A: Aleo, Private: Visibility<A>> Owner<A, Private>
impl<A: Aleo, Private: Visibility<A>> Owner<A, Private>
Trait Implementations§
Source§impl<A: Aleo> Inject for Owner<A, Ciphertext<A>>
impl<A: Aleo> Inject for Owner<A, Ciphertext<A>>
Source§fn new(_: Mode, owner: Self::Primitive) -> Self
fn new(_: Mode, owner: Self::Primitive) -> Self
Initializes ciphertext owner from a primitive.
type Primitive = Owner<<A as Environment>::Network, Ciphertext<<A as Environment>::Network>>
Source§impl<A: Aleo> Inject for Owner<A, Plaintext<A>>
impl<A: Aleo> Inject for Owner<A, Plaintext<A>>
type Primitive = Owner<<A as Environment>::Network, Plaintext<<A as Environment>::Network>>
Source§impl<A: Aleo> ToBits for Owner<A, Ciphertext<A>>
impl<A: Aleo> ToBits for Owner<A, Ciphertext<A>>
Source§fn write_bits_le(&self, vec: &mut Vec<Boolean<A>>)
fn write_bits_le(&self, vec: &mut Vec<Boolean<A>>)
Returns self
as a boolean vector in little-endian order.
Source§fn write_bits_be(&self, vec: &mut Vec<Boolean<A>>)
fn write_bits_be(&self, vec: &mut Vec<Boolean<A>>)
Returns self
as a boolean vector in big-endian order.
type Boolean = Boolean<A>
Source§fn to_bits_le(&self) -> Vec<Self::Boolean>
fn to_bits_le(&self) -> Vec<Self::Boolean>
Returns the little-endian bits of the circuit.
Source§fn to_bits_be(&self) -> Vec<Self::Boolean>
fn to_bits_be(&self) -> Vec<Self::Boolean>
Returns the big-endian bits of the circuit.
Source§impl<A: Aleo> ToBits for Owner<A, Plaintext<A>>
impl<A: Aleo> ToBits for Owner<A, Plaintext<A>>
Source§fn write_bits_le(&self, vec: &mut Vec<Boolean<A>>)
fn write_bits_le(&self, vec: &mut Vec<Boolean<A>>)
Returns self
as a boolean vector in little-endian order.
Source§fn write_bits_be(&self, vec: &mut Vec<Boolean<A>>)
fn write_bits_be(&self, vec: &mut Vec<Boolean<A>>)
Returns self
as a boolean vector in big-endian order.
type Boolean = Boolean<A>
Source§fn to_bits_le(&self) -> Vec<Self::Boolean>
fn to_bits_le(&self) -> Vec<Self::Boolean>
Returns the little-endian bits of the circuit.
Source§fn to_bits_be(&self) -> Vec<Self::Boolean>
fn to_bits_be(&self) -> Vec<Self::Boolean>
Returns the big-endian bits of the circuit.
Auto Trait Implementations§
impl<A, Private> !Freeze for Owner<A, Private>
impl<A, Private> RefUnwindSafe for Owner<A, Private>
impl<A, Private> !Send for Owner<A, Private>
impl<A, Private> !Sync for Owner<A, Private>
impl<A, Private> Unpin for Owner<A, Private>
impl<A, Private> UnwindSafe for Owner<A, 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<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