Skip to main content

Tally

Trait Tally 

Source
pub trait Tally<T: NodeType> {
    type Vote: Send + 'static;
    type Output: Send + 'static;

    // Required method
    fn tally(
        r: Receiver<Self::Vote>,
        m: EpochMembership<T>,
        l: UpgradeLock<T>,
    ) -> Option<Self::Output>;
}
Expand description

How to count votes to form a certificate.

Required Associated Types§

Source

type Vote: Send + 'static

Source

type Output: Send + 'static

Required Methods§

Source

fn tally( r: Receiver<Self::Vote>, m: EpochMembership<T>, l: UpgradeLock<T>, ) -> Option<Self::Output>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, V, C> Tally<T> for SimpleTally<T, V, C>
where T: NodeType, V: Vote<T> + Send + 'static, C: Certificate<T, V::Commitment, Voteable = V::Commitment> + HasEpoch + Send + 'static,

Source§

impl<T: NodeType> Tally<T> for EpochRootTally<T>