Struct sc_finality_grandpa::report::RoundState [−]
pub struct RoundState<Id> where
Id: Eq + Hash, { pub total_weight: VoterWeight, pub threshold_weight: VoterWeight, pub prevote_current_weight: VoteWeight, pub prevote_ids: HashSet<Id, RandomState>, pub precommit_current_weight: VoteWeight, pub precommit_ids: HashSet<Id, RandomState>, }
Expand description
Basic data struct for the state of a round.
Fields
total_weight: VoterWeightTotal weight of all votes.
threshold_weight: VoterWeightThe threshold voter weight.
prevote_current_weight: VoteWeightCurrent weight of the prevotes.
prevote_ids: HashSet<Id, RandomState>The identities of nodes that have cast prevotes so far.
precommit_current_weight: VoteWeightCurrent weight of the precommits.
precommit_ids: HashSet<Id, RandomState>The identities of nodes that have cast precommits so far.
Trait Implementations
impl<Id> Clone for RoundState<Id> where
Id: Clone + Eq + Hash,
impl<Id> Clone for RoundState<Id> where
Id: Clone + Eq + Hash, pub fn clone(&self) -> RoundState<Id>
pub fn clone(&self) -> RoundState<Id>Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
impl<Id> PartialEq<RoundState<Id>> for RoundState<Id> where
Id: PartialEq<Id> + Eq + Hash,
impl<Id> PartialEq<RoundState<Id>> for RoundState<Id> where
Id: PartialEq<Id> + Eq + Hash, pub fn eq(&self, other: &RoundState<Id>) -> bool
pub fn eq(&self, other: &RoundState<Id>) -> boolThis method tests for self and other values to be equal, and is used
by ==. Read more
pub fn ne(&self, other: &RoundState<Id>) -> bool
pub fn ne(&self, other: &RoundState<Id>) -> boolThis method tests for !=.
impl<Id> Eq for RoundState<Id> where
Id: Eq + Hash, impl<Id> StructuralEq for RoundState<Id> where
Id: Eq + Hash, impl<Id> StructuralPartialEq for RoundState<Id> where
Id: Eq + Hash, 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
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any, Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read more
Compare self to key and return true if they are equal.
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = TShould always be Self
The counterpart to unchecked_from.
Consume self to return an equivalent value of T.
pub fn vzip(self) -> VAttaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more