Enum snarkvm_wasm::program::Owner
pub enum Owner<N, Private>where
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
impl<N, Private> Owner<N, Private>where
N: Network,
Private: Visibility,
impl<N, Private> Owner<N, Private>where
N: Network,
Private: Visibility,
pub const fn is_private(&self) -> bool
pub const fn is_private(&self) -> bool
Returns true if self is private.
impl<N> Owner<N, Plaintext<N>>where
N: Network,
impl<N> Owner<N, Plaintext<N>>where
N: Network,
pub fn encrypt_with_randomizer(
&self,
randomizer: &[Field<N>]
) -> Result<Owner<N, Ciphertext<N>>, Error>
pub fn encrypt_with_randomizer(
&self,
randomizer: &[Field<N>]
) -> Result<Owner<N, Ciphertext<N>>, Error>
Encrypts self under the given randomizer.
impl<N> Owner<N, Ciphertext<N>>where
N: Network,
impl<N> Owner<N, Ciphertext<N>>where
N: Network,
Methods from Deref<Target = Group<E>>
pub 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.
pub 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.
pub 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> = Field<E>::new(E::EDWARDS_A)
pub const EDWARDS_D: Field<E> = Field<E>::new(E::EDWARDS_D)
pub const MONTGOMERY_A: Field<E> = Field<E>::new(E::MONTGOMERY_A)
pub const MONTGOMERY_B: Field<E> = Field<E>::new(E::MONTGOMERY_B)
pub fn mul_by_cofactor(&self) -> Group<E>
pub fn mul_by_cofactor(&self) -> Group<E>
Returns self * COFACTOR.
pub fn div_by_cofactor(&self) -> Group<E>
pub fn div_by_cofactor(&self) -> Group<E>
Returns self / COFACTOR.
Trait Implementations
impl<N, Private> Equal<Owner<N, Private>> for Owner<N, Private>where
N: Network,
Private: Visibility<Boolean = Boolean<N>>,
impl<N, Private> Equal<Owner<N, Private>> for Owner<N, Private>where
N: Network,
Private: Visibility<Boolean = Boolean<N>>,
fn is_equal(
&self,
other: &Owner<N, Private>
) -> <Owner<N, Private> as Equal<Owner<N, Private>>>::Output
fn is_equal(
&self,
other: &Owner<N, Private>
) -> <Owner<N, Private> as Equal<Owner<N, Private>>>::Output
Returns true if self and other are equal.
fn is_not_equal(
&self,
other: &Owner<N, Private>
) -> <Owner<N, Private> as Equal<Owner<N, Private>>>::Output
fn is_not_equal(
&self,
other: &Owner<N, Private>
) -> <Owner<N, Private> as Equal<Owner<N, Private>>>::Output
Returns true if self and other are not equal.
type Output = Boolean<N>
impl<N, Private> FromBytes for Owner<N, Private>where
N: Network,
Private: Visibility,
impl<N, Private> FromBytes for Owner<N, Private>where
N: Network,
Private: Visibility,
impl<N, Private> PartialEq<Owner<N, Private>> for Owner<N, Private>where
N: Network,
Private: Visibility<Boolean = Boolean<N>>,
impl<N, Private> PartialEq<Owner<N, Private>> for Owner<N, Private>where
N: Network,
Private: Visibility<Boolean = Boolean<N>>,
impl<N> ToBits for Owner<N, Ciphertext<N>>where
N: Network,
impl<N> ToBits for Owner<N, Ciphertext<N>>where
N: Network,
impl<N> ToBits for Owner<N, Plaintext<N>>where
N: Network,
impl<N> ToBits for Owner<N, Plaintext<N>>where
N: Network,
impl<N, Private> ToBytes for Owner<N, Private>where
N: Network,
Private: Visibility,
impl<N, Private> ToBytes for Owner<N, Private>where
N: Network,
Private: Visibility,
impl<N, Private> Eq for Owner<N, Private>where
N: Network,
Private: Visibility<Boolean = Boolean<N>>,
Auto Trait Implementations
impl<N, Private> RefUnwindSafe for Owner<N, Private>where
Private: RefUnwindSafe,
<N as Environment>::Projective: RefUnwindSafe,
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>where
Private: Unpin,
<N as Environment>::Projective: Unpin,
impl<N, Private> UnwindSafe for Owner<N, Private>where
Private: UnwindSafe,
<N as Environment>::Projective: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
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.sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;