Enum exonum::storage::ListProof [] [src]

pub enum ListProof<V> {
    Full(Box<ListProof<V>>, Box<ListProof<V>>),
    Left(Box<ListProof<V>>, Option<Hash>),
    Right(HashBox<ListProof<V>>),
    Leaf(V),
}

An enum that represents a proof of existence for a proof list elements.

Variants

A branch of proof in which both children contain requested elements.

A branch of proof in which only left child contains requested elements.

A branch of proof in which only right child contains requested elements.

A leaf of proof with requested element.

Methods

impl<V: StorageValue> ListProof<V>
[src]

[src]

Verifies the correctness of the proof by the trusted root hash and the number of elements in the tree.

If the proof is valid, a vector with indices and references to elements is returned. Otherwise, Err is returned.

Trait Implementations

impl<V: Debug> Debug for ListProof<V>
[src]

[src]

Formats the value using the given formatter.

impl<V: PartialEq> PartialEq for ListProof<V>
[src]

[src]

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

[src]

This method tests for !=.

impl<V: Eq> Eq for ListProof<V>
[src]

impl<V: Serialize> Serialize for ListProof<V>
[src]

[src]

Serialize this value into the given Serde serializer. Read more

impl<'a, V> Deserialize<'a> for ListProof<V> where
    V: Deserialize<'de>, 
[src]

[src]

Deserialize this value from the given Serde deserializer. Read more