pub struct NetworkUsage {
pub duration: u64,
pub total_bytes: u64,
pub rx_bytes: u32,
pub tx_bytes: u32,
pub interface_name: SbpString<[u8; 16], Unterminated>,
}
Expand description
Bandwidth usage measurement for a single interface
The bandwidth usage for each interface can be reported within this struct and utilize multiple fields to fully specify the type of traffic that is being tracked. As either the interval of collection or the collection time may vary, both a timestamp and period field is provided, though may not necessarily be populated with a value.
Fields
duration: u64
Duration over which the measurement was collected
total_bytes: u64
Number of bytes handled in total within period
rx_bytes: u32
Number of bytes transmitted within period
tx_bytes: u32
Number of bytes received within period
interface_name: SbpString<[u8; 16], Unterminated>
Interface Name
Trait Implementations
sourceimpl Clone for NetworkUsage
impl Clone for NetworkUsage
sourcefn clone(&self) -> NetworkUsage
fn clone(&self) -> NetworkUsage
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for NetworkUsage
impl Send for NetworkUsage
impl Sync for NetworkUsage
impl Unpin for NetworkUsage
impl UnwindSafe for NetworkUsage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more