[][src]Enum elements::confidential::Nonce

pub enum Nonce {
    Null,
    Explicit(Hash),
    Confidential(u8[u8; 32]),
}

A CT commitment to an output nonce (i.e. a public key)

Variants

Null

No value

Explicit(Hash)

There should be no such thing as an "explicit nonce", but Elements will deserialize such a thing (and insists that its size be 32 bytes). So we stick a 32-byte type here that implements all the traits we need.

Confidential(u8[u8; 32])

Nonce is committed

Methods

impl Nonce[src]

pub fn encoded_length(&self) -> usize[src]

Serialized length, in bytes

Trait Implementations

impl PartialOrd<Nonce> for Nonce[src]

impl PartialEq<Nonce> for Nonce[src]

impl Ord for Nonce[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl Copy for Nonce[src]

impl Default for Nonce[src]

impl Clone for Nonce[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Eq for Nonce[src]

impl Hash for Nonce[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for Nonce[src]

impl Debug for Nonce[src]

impl<D: Decoder> Decodable<D> for Nonce[src]

impl<S: Encoder> Encodable<S> for Nonce[src]

Auto Trait Implementations

impl Sync for Nonce

impl Send for Nonce

impl Unpin for Nonce

impl RefUnwindSafe for Nonce

impl UnwindSafe for Nonce

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]