Skip to main content

InterfaceStatus

Trait InterfaceStatus 

Source
pub trait InterfaceStatus {
    // Required methods
    fn id(&self) -> InterfaceId;
    fn connection(&self) -> ConnectionState;
    fn rx_bytes(&self) -> u64;
    fn tx_bytes(&self) -> u64;

    // Provided methods
    fn failure_reason(&self) -> Option<&'static str> { ... }
    fn airtime(&self) -> Option<AirtimeUtilization> { ... }
    fn transfer_rates(&self) -> Option<TransferRates> { ... }
}

Required Methods§

Source

fn id(&self) -> InterfaceId

Source

fn connection(&self) -> ConnectionState

Source

fn rx_bytes(&self) -> u64

Source

fn tx_bytes(&self) -> u64

Provided Methods§

Source

fn failure_reason(&self) -> Option<&'static str>

Source

fn airtime(&self) -> Option<AirtimeUtilization>

None until the interface publishes — a link with no declared bitrate never does.

Source

fn transfer_rates(&self) -> Option<TransferRates>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> InterfaceStatus for &T
where T: InterfaceStatus + ?Sized,

Implementors§