Skip to main content

InterfaceProvider

Trait InterfaceProvider 

Source
pub trait InterfaceProvider {
    type Interface;

    // Required method
    fn interfaces(&self) -> Result<Vec<Self::Interface>, Error>;
}
Expand description

Lists network interfaces.

Generic over an associated Interface type rather than naming net_lattice_model::interface::Interface directly — net-lattice-platform does not depend on net-lattice-model (see ARCHITECTURE.md). The facade crate (net-lattice) is what constrains Interface to the concrete model type.

Unlike RouteProvider, this trait is read-only for now: listing interfaces. Configuring interfaces (setting MTU, bringing them up/down) is a write operation that will be added once the API design for InterfaceConfig vs Interface state/config split is settled — see ARCHITECTURE.md’s State Model section.

Required Associated Types§

Required Methods§

Source

fn interfaces(&self) -> Result<Vec<Self::Interface>, Error>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl InterfaceProvider for LinuxBackend

Implementors§