[][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 Clone for Nonce[src]

impl Copy for Nonce[src]

impl Debug for Nonce[src]

impl Decodable for Nonce[src]

impl Default for Nonce[src]

impl Display for Nonce[src]

impl Encodable for Nonce[src]

impl Eq for Nonce[src]

impl Hash for Nonce[src]

impl Ord for Nonce[src]

impl PartialEq<Nonce> for Nonce[src]

impl PartialOrd<Nonce> for Nonce[src]

impl StructuralEq for Nonce[src]

impl StructuralPartialEq for Nonce[src]

Auto Trait Implementations

impl RefUnwindSafe for Nonce

impl Send for Nonce

impl Sync for Nonce

impl Unpin for Nonce

impl UnwindSafe for Nonce

Blanket Implementations

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

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

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

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

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, 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.