[][src]Struct exonum_merkledb::ProofOfAbsence

pub struct ProofOfAbsence { /* fields omitted */ }

Encapsulates a proof of absence for ProofListIndex.

Proof of absence for an element with the specified index consists of merkle_root of ProofListIndex and length of the list.

Element with index is absent in the list with provided length and merkle_root when two conditions are met:

1. list_hash == sha256( HashTag::List || length || merkle_root )
2. index > length

In case of a range proof this rule applies to the whole range.

Methods

impl ProofOfAbsence[src]

pub fn new(length: u64, merkle_root: Hash) -> Self[src]

New ProofOfAbsence for specified list length and merkle_root.

pub fn length(&self) -> u64[src]

Return the length of the corresponding ProofListIndex.

pub fn merkle_root(&self) -> Hash[src]

Return the Merkle root of the corresponding ProofListIndex.

Trait Implementations

impl Clone for ProofOfAbsence[src]

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

Performs copy-assignment from source. Read more

impl PartialEq<ProofOfAbsence> for ProofOfAbsence[src]

impl Eq for ProofOfAbsence[src]

impl Debug for ProofOfAbsence[src]

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> Into<U> for T where
    U: From<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]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,