pub trait Ballot {
type Signer;
// Required methods
fn view(&self) -> ViewNumber;
fn epoch(&self) -> Option<EpochNumber>;
fn signer(&self) -> Self::Signer;
// Provided method
fn epochs(&self) -> impl Iterator<Item = EpochNumber> { ... }
}Expand description
Information about a vote.
Used by VoteCollector to handle incoming votes, i.e. reject
duplicate votes by the same signer, or stale votes for GCed views,
before even tallying the vote.
Required Associated Types§
Required Methods§
fn view(&self) -> ViewNumber
fn epoch(&self) -> Option<EpochNumber>
fn signer(&self) -> Self::Signer
Provided Methods§
Sourcefn epochs(&self) -> impl Iterator<Item = EpochNumber>
fn epochs(&self) -> impl Iterator<Item = EpochNumber>
The epochs whose committees counting the vote reads, its own included.
The vote waits until every one of them is known.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".