EthtoolReadable

Trait EthtoolReadable 

Source
pub trait EthtoolReadable {
    // Required methods
    fn new(if_name: &str) -> Result<Self, EthtoolError>
       where Self: Sized;
    fn stats(&self) -> Result<Vec<(String, u64)>, EthtoolError>;
}
Expand description

A trait for reading stats using ethtool.

This trait allows mocking the ethtool calls for unit testing.

Required Methods§

Source

fn new(if_name: &str) -> Result<Self, EthtoolError>
where Self: Sized,

Source

fn stats(&self) -> Result<Vec<(String, u64)>, EthtoolError>

Implementors§