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§
fn new(if_name: &str) -> Result<Self, EthtoolError>where
Self: Sized,
fn stats(&self) -> Result<Vec<(String, u64)>, EthtoolError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".