[][src]Struct rhododendron::accumulator::UncheckedJustification

pub struct UncheckedJustification<D, S> {
    pub round_number: u32,
    pub digest: D,
    pub signatures: Vec<S>,
}

Justification for some state at a given round.

Fields

round_number: u32

The round.

digest: D

The digest prepared for.

signatures: Vec<S>

Signatures for the prepare messages.

Methods

impl<D, S> UncheckedJustification<D, S>[src]

pub fn check<F, V>(
    self,
    threshold: usize,
    check_message: F
) -> Result<Justification<D, S>, Self> where
    F: FnMut(u32, &D, &S) -> Option<V>,
    V: Hash + Eq
[src]

Fails if there are duplicate signatures or invalid.

Provide a closure for checking whether the signature is valid on a digest.

The closure should returns a checked justification iff the round number, digest, and signature represent a valid message and the signer was authorized to issue it.

The check_message closure may vary based on context.

Trait Implementations

impl<D: Clone, S: Clone> Clone for UncheckedJustification<D, S>[src]

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

Performs copy-assignment from source. Read more

impl<D: PartialEq, S: PartialEq> PartialEq<UncheckedJustification<D, S>> for UncheckedJustification<D, S>[src]

impl<D: Eq, S: Eq> Eq for UncheckedJustification<D, S>[src]

impl<D: Debug, S: Debug> Debug for UncheckedJustification<D, S>[src]

Auto Trait Implementations

impl<D, S> Sync for UncheckedJustification<D, S> where
    D: Sync,
    S: Sync

impl<D, S> Send for UncheckedJustification<D, S> where
    D: Send,
    S: Send

impl<D, S> Unpin for UncheckedJustification<D, S> where
    D: Unpin,
    S: Unpin

impl<D, S> RefUnwindSafe for UncheckedJustification<D, S> where
    D: RefUnwindSafe,
    S: RefUnwindSafe

impl<D, S> UnwindSafe for UncheckedJustification<D, S> where
    D: UnwindSafe,
    S: UnwindSafe

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]