Struct finality_grandpa::voter::report::RoundState
source · [−]pub struct RoundState<Id: Eq + Hash> {
pub total_weight: VoterWeight,
pub threshold_weight: VoterWeight,
pub prevote_current_weight: VoteWeight,
pub prevote_ids: HashSet<Id>,
pub precommit_current_weight: VoteWeight,
pub precommit_ids: HashSet<Id>,
}
Expand description
Basic data struct for the state of a round.
Fields
total_weight: VoterWeight
Total weight of all votes.
threshold_weight: VoterWeight
The threshold voter weight.
prevote_current_weight: VoteWeight
Current weight of the prevotes.
prevote_ids: HashSet<Id>
The identities of nodes that have cast prevotes so far.
precommit_current_weight: VoteWeight
Current weight of the precommits.
precommit_ids: HashSet<Id>
The identities of nodes that have cast precommits so far.
Trait Implementations
sourceimpl<Id: Clone + Eq + Hash> Clone for RoundState<Id>
impl<Id: Clone + Eq + Hash> Clone for RoundState<Id>
sourcefn clone(&self) -> RoundState<Id>
fn clone(&self) -> RoundState<Id>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<Id: PartialEq + Eq + Hash> PartialEq<RoundState<Id>> for RoundState<Id>
impl<Id: PartialEq + Eq + Hash> PartialEq<RoundState<Id>> for RoundState<Id>
sourcefn eq(&self, other: &RoundState<Id>) -> bool
fn eq(&self, other: &RoundState<Id>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RoundState<Id>) -> bool
fn ne(&self, other: &RoundState<Id>) -> bool
This method tests for !=
.
impl<Id: Eq + Eq + Hash> Eq for RoundState<Id>
impl<Id: Eq + Hash> StructuralEq for RoundState<Id>
impl<Id: Eq + Hash> StructuralPartialEq for RoundState<Id>
Auto Trait Implementations
impl<Id> RefUnwindSafe for RoundState<Id> where
Id: RefUnwindSafe,
impl<Id> Send for RoundState<Id> where
Id: Send,
impl<Id> Sync for RoundState<Id> where
Id: Sync,
impl<Id> Unpin for RoundState<Id> where
Id: Unpin,
impl<Id> UnwindSafe for RoundState<Id> where
Id: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more