pub struct Sv2ClientInfo {
pub client_id: usize,
pub client_kind: Sv2ClientKind,
pub extended_channels: Vec<ExtendedChannelInfo>,
pub standard_channels: Vec<StandardChannelInfo>,
pub management_ip: Option<IpAddr>,
pub miner_telemetry: Option<MinerTelemetry>,
pub miner_telemetry_status: Option<MinerTelemetryStatus>,
}Expand description
Full information about a single Sv2 client including all channels
Fields§
§client_id: usize§client_kind: Sv2ClientKindClassification inferred from the client’s SV2 SetupConnection metadata.
extended_channels: Vec<ExtendedChannelInfo>§standard_channels: Vec<StandardChannelInfo>§management_ip: Option<IpAddr>Miner management IP used for matched telemetry, if discovery found one.
miner_telemetry: Option<MinerTelemetry>Latest telemetry fetched from the matched miner management interface.
miner_telemetry_status: Option<MinerTelemetryStatus>Current discovery and fetch status for miner telemetry matching.
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