pub struct LeadersParticipationRecord {
total: u32,
log: Hamt<DefaultHasher, PoolId, u32>,
}
Expand description
Count how many blocks have been created by a specific Pool
Fields§
§total: u32
§log: Hamt<DefaultHasher, PoolId, u32>
Implementations§
source§impl LeadersParticipationRecord
impl LeadersParticipationRecord
pub fn total(&self) -> u32
pub fn nb_participants(&self) -> usize
sourcepub fn increase_for(&mut self, pool: &PoolId)
pub fn increase_for(&mut self, pool: &PoolId)
Add one count to a pool. if the pool doesn’t exist, then set it to 1
Trait Implementations§
source§impl Clone for LeadersParticipationRecord
impl Clone for LeadersParticipationRecord
source§fn clone(&self) -> LeadersParticipationRecord
fn clone(&self) -> LeadersParticipationRecord
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for LeadersParticipationRecord
impl Default for LeadersParticipationRecord
source§impl PartialEq<LeadersParticipationRecord> for LeadersParticipationRecord
impl PartialEq<LeadersParticipationRecord> for LeadersParticipationRecord
source§fn eq(&self, other: &LeadersParticipationRecord) -> bool
fn eq(&self, other: &LeadersParticipationRecord) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for LeadersParticipationRecord
impl StructuralEq for LeadersParticipationRecord
impl StructuralPartialEq for LeadersParticipationRecord
Auto Trait Implementations§
impl RefUnwindSafe for LeadersParticipationRecord
impl Send for LeadersParticipationRecord
impl Sync for LeadersParticipationRecord
impl Unpin for LeadersParticipationRecord
impl UnwindSafe for LeadersParticipationRecord
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more