pub struct HashrateDistribution {
pub pools: Vec<MiningPoolStats>,
pub block_count: u64,
pub last_estimated_hashrate: f64,
}Expand description
Hashrate distribution across pools.
Fields§
§pools: Vec<MiningPoolStats>Pool statistics
block_count: u64Total block count in period
last_estimated_hashrate: f64Time period in seconds
Implementations§
Source§impl HashrateDistribution
impl HashrateDistribution
Sourcepub fn get_pool(&self, name: &str) -> Option<&MiningPoolStats>
pub fn get_pool(&self, name: &str) -> Option<&MiningPoolStats>
Get pool by name.
Sourcepub fn top_pools(&self, n: usize) -> Vec<&MiningPoolStats>
pub fn top_pools(&self, n: usize) -> Vec<&MiningPoolStats>
Get top N pools by block count.
Sourcepub fn total_hashrate(&self) -> f64
pub fn total_hashrate(&self) -> f64
Get total hashrate (sum of all pools).
Trait Implementations§
Source§impl Clone for HashrateDistribution
impl Clone for HashrateDistribution
Source§fn clone(&self) -> HashrateDistribution
fn clone(&self) -> HashrateDistribution
Returns a duplicate 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 Debug for HashrateDistribution
impl Debug for HashrateDistribution
Source§impl<'de> Deserialize<'de> for HashrateDistribution
impl<'de> Deserialize<'de> for HashrateDistribution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for HashrateDistribution
impl PartialEq for HashrateDistribution
Source§impl Serialize for HashrateDistribution
impl Serialize for HashrateDistribution
impl StructuralPartialEq for HashrateDistribution
Auto Trait Implementations§
impl Freeze for HashrateDistribution
impl RefUnwindSafe for HashrateDistribution
impl Send for HashrateDistribution
impl Sync for HashrateDistribution
impl Unpin for HashrateDistribution
impl UnwindSafe for HashrateDistribution
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