Struct commit_verify::multi_commit::MultiCommitment[][src]

pub struct MultiCommitment(_);
Expand description

Final LNPBP-4 commitment value.

Represents tagged hash (with Lnpbp4Tag) of the sequentially serialized MultiCommitBlock::commitments.

Trait Implementations

impl AsMut<<MultiCommitment as Wrapper>::Inner> for MultiCommitment[src]

fn as_mut(&mut self) -> &mut Self::Inner[src]

Performs the conversion.

impl AsRef<<MultiCommitment as Wrapper>::Inner> for MultiCommitment[src]

fn as_ref(&self) -> &Self::Inner[src]

Performs the conversion.

impl Borrow<<MultiCommitment as Wrapper>::Inner> for MultiCommitment[src]

fn borrow(&self) -> &Self::Inner[src]

Immutably borrows from an owned value. Read more

impl BorrowMut<<MultiCommitment as Wrapper>::Inner> for MultiCommitment[src]

fn borrow_mut(&mut self) -> &mut Self::Inner[src]

Mutably borrows from an owned value. Read more

impl Clone for MultiCommitment[src]

fn clone(&self) -> MultiCommitment[src]

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl<M> CommitVerify<M> for MultiCommitment where
    M: AsRef<[u8]>, 
[src]

fn commit(msg: &M) -> MultiCommitment[src]

Creates a commitment to a byte representation of a given message

fn verify(&self, msg: &M) -> bool[src]

Verifies commitment against the message; default implementation just repeats the commitment to the message and check it against the self. Read more

impl Debug for MultiCommitment[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for MultiCommitment[src]

fn default() -> MultiCommitment[src]

Returns the “default value” for a type. Read more

impl Deref for MultiCommitment[src]

type Target = Self::Inner

The resulting type after dereferencing.

fn deref(&self) -> &Self::Target[src]

Dereferences the value.

impl DerefMut for MultiCommitment[src]

fn deref_mut(&mut self) -> &mut Self::Target[src]

Mutably dereferences the value.

impl Display for MultiCommitment[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl From<Hash<Lnpbp4Tag>> for MultiCommitment[src]

fn from(v: Hash<Lnpbp4Tag>) -> Self[src]

Performs the conversion.

impl Hash for MultiCommitment[src]

fn hash<__H: Hasher>(&self, state: &mut __H)[src]

Feeds this value into the given Hasher. Read more

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 Index<Range<usize>> for MultiCommitment[src]

type Output = <Self::Inner as Index<Range<usize>>>::Output

The returned type after indexing.

fn index(&self, index: Range<usize>) -> &Self::Output[src]

Performs the indexing (container[index]) operation. Read more

impl Index<RangeFrom<usize>> for MultiCommitment[src]

type Output = <Self::Inner as Index<RangeFrom<usize>>>::Output

The returned type after indexing.

fn index(&self, index: RangeFrom<usize>) -> &Self::Output[src]

Performs the indexing (container[index]) operation. Read more

impl Index<RangeFull> for MultiCommitment[src]

type Output = <Self::Inner as Index<RangeFull>>::Output

The returned type after indexing.

fn index(&self, index: RangeFull) -> &Self::Output[src]

Performs the indexing (container[index]) operation. Read more

impl Index<RangeTo<usize>> for MultiCommitment[src]

type Output = <Self::Inner as Index<RangeTo<usize>>>::Output

The returned type after indexing.

fn index(&self, index: RangeTo<usize>) -> &Self::Output[src]

Performs the indexing (container[index]) operation. Read more

impl Index<usize> for MultiCommitment[src]

type Output = <Self::Inner as Index<usize>>::Output

The returned type after indexing.

fn index(&self, index: usize) -> &Self::Output[src]

Performs the indexing (container[index]) operation. Read more

impl LowerHex for MultiCommitment[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter.

impl Ord for MultiCommitment[src]

fn cmp(&self, other: &MultiCommitment) -> Ordering[src]

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

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

Restrict a value to a certain interval. Read more

impl PartialEq<MultiCommitment> for MultiCommitment[src]

fn eq(&self, other: &MultiCommitment) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &MultiCommitment) -> bool[src]

This method tests for !=.

impl PartialOrd<MultiCommitment> for MultiCommitment[src]

fn partial_cmp(&self, other: &MultiCommitment) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Strategy for MultiCommitment[src]

type Strategy = UsingStrict

Specific strategy. List of supported strategies: Read more

impl Strategy for MultiCommitment[src]

type Strategy = Wrapped

Specific strategy. List of supported strategies: Read more

impl Wrapper for MultiCommitment[src]

type Inner = Hash<Lnpbp4Tag>

Inner type wrapped by the current newtype

fn from_inner(inner: Self::Inner) -> Self[src]

Instantiates wrapper type with the inner data

fn as_inner(&self) -> &Self::Inner[src]

Returns reference to the inner representation for the wrapper type

fn as_inner_mut(&mut self) -> &mut Self::Inner[src]

Returns a mutable reference to the inner representation for the wrapper type Read more

fn into_inner(self) -> Self::Inner[src]

Unwraps the wrapper returning the inner type

fn to_inner(&self) -> Self::Inner[src]

Clones inner data of the wrapped type and return them

fn copy(&self) -> Self where
    Self::Inner: Copy
[src]

Copies the wrapped type

impl Copy for MultiCommitment[src]

impl Eq for MultiCommitment[src]

impl StructuralEq for MultiCommitment[src]

impl StructuralPartialEq for MultiCommitment[src]

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<'a, U, T> TaggedHash<'a, T> for U where
    T: 'a + Tag,
    U: Wrapper<Inner = Hash<T>>, 
[src]

fn hash(msg: impl AsRef<[u8]>) -> Self where
    Self: Sized
[src]

Constructs tagged hash out of a given message data

fn from_hash<X>(hash: X) -> Self where
    Self: Sized,
    X: Hash<Inner = [u8; 32]>, 
[src]

Constructs tagged hash out of other hash type. Read more

fn from_slice(slice: &[u8]) -> Result<Self, Error> where
    Self: Sized
[src]

Constructs tagged hash from byte slice. If slice length is not equal to 32 bytes, fails with Error::InvalidLength (this is just a wrapper for sha256t::Hash::from_slice). Read more

fn as_slice(&'a self) -> &'a [u8; 32][src]

Returns 32-byte slice array representing internal hash data

fn from_hex(hex: &str) -> Result<Self, Error> where
    Self: Sized
[src]

Constructs tagged hash from a given hexadecimal string

impl<T> ToHex for T where
    T: LowerHex
[src]

pub fn to_hex(&self) -> String[src]

Outputs the hash in hexadecimal form

impl<T> ToHex for T where
    T: LowerHex
[src]

pub fn to_hex(&self) -> String[src]

Outputs the hash in hexadecimal form

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.