[][src]Struct storage_proofs::drgporep::DataProof

pub struct DataProof<H: Hasher> {
    pub proof: MerkleProof<H>,
    pub data: H::Domain,
}

Fields

proof: MerkleProof<H>data: H::Domain

Methods

impl<H: Hasher> DataProof<H>[src]

pub fn new(n: usize) -> Self[src]

pub fn serialize(&self) -> Vec<u8>[src]

pub fn proves_challenge(&self, challenge: usize) -> bool[src]

proves_challenge returns true if this self.proof corresponds to challenge. This is useful for verifying that a supplied proof is actually relevant to a given challenge.

Trait Implementations

impl<H: Clone + Hasher> Clone for DataProof<H> where
    H::Domain: Clone
[src]

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

Performs copy-assignment from source. Read more

impl<H: Debug + Hasher> Debug for DataProof<H> where
    H::Domain: Debug
[src]

impl<H: Hasher> Serialize for DataProof<H> where
    MerkleProof<H>: Serialize,
    H::Domain: Serialize
[src]

impl<'de, H: Hasher> Deserialize<'de> for DataProof<H> where
    MerkleProof<H>: Deserialize<'de>,
    H::Domain: Deserialize<'de>, 
[src]

Auto Trait Implementations

impl<H> Unpin for DataProof<H> where
    H: Unpin,
    <H as Hasher>::Domain: Unpin

impl<H> Sync for DataProof<H> where
    <H as Hasher>::Domain: Sync

impl<H> Send for DataProof<H> where
    <H as Hasher>::Domain: Send

impl<H> RefUnwindSafe for DataProof<H> where
    H: RefUnwindSafe,
    <H as Hasher>::Domain: RefUnwindSafe

impl<H> UnwindSafe for DataProof<H> where
    H: UnwindSafe,
    <H as Hasher>::Domain: UnwindSafe

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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