sc_network::service::traits

Trait BandwidthSink

Source
pub trait BandwidthSink: Send + Sync {
    // Required methods
    fn total_inbound(&self) -> u64;
    fn total_outbound(&self) -> u64;
}
Expand description

Trait defining the behavior of a bandwidth sink.

Required Methods§

Source

fn total_inbound(&self) -> u64

Get the number of bytes received.

Source

fn total_outbound(&self) -> u64

Get the number of bytes sent.

Implementors§