pub struct Sv2ClientInfo {
pub client_id: usize,
pub extended_channels: Vec<ExtendedChannelInfo>,
pub standard_channels: Vec<StandardChannelInfo>,
pub miner_telemetry: Option<MinerTelemetry>,
}Expand description
Full information about a single Sv2 client including all channels
Fields§
§client_id: usize§extended_channels: Vec<ExtendedChannelInfo>§standard_channels: Vec<StandardChannelInfo>§miner_telemetry: Option<MinerTelemetry>Implementations§
Source§impl Sv2ClientInfo
impl Sv2ClientInfo
pub fn new( client_id: usize, extended_channels: Vec<ExtendedChannelInfo>, standard_channels: Vec<StandardChannelInfo>, ) -> Self
Sourcepub fn total_channels(&self) -> usize
pub fn total_channels(&self) -> usize
Get total number of channels for this client
Sourcepub fn total_hashrate(&self) -> f32
pub fn total_hashrate(&self) -> f32
Get total hashrate for this client
Sourcepub fn to_metadata(&self) -> Sv2ClientMetadata
pub fn to_metadata(&self) -> Sv2ClientMetadata
Convert to metadata (without channel arrays)
Trait Implementations§
Source§impl Clone for Sv2ClientInfo
impl Clone for Sv2ClientInfo
Source§fn clone(&self) -> Sv2ClientInfo
fn clone(&self) -> Sv2ClientInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ComposeSchema for Sv2ClientInfo
impl ComposeSchema for Sv2ClientInfo
Source§impl Debug for Sv2ClientInfo
impl Debug for Sv2ClientInfo
Source§impl<'de> Deserialize<'de> for Sv2ClientInfo
impl<'de> Deserialize<'de> for Sv2ClientInfo
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 Serialize for Sv2ClientInfo
impl Serialize for Sv2ClientInfo
Auto Trait Implementations§
impl Freeze for Sv2ClientInfo
impl RefUnwindSafe for Sv2ClientInfo
impl Send for Sv2ClientInfo
impl Sync for Sv2ClientInfo
impl Unpin for Sv2ClientInfo
impl UnsafeUnpin for Sv2ClientInfo
impl UnwindSafe for Sv2ClientInfo
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