net-lattice-platform 0.12.0

Generic provider traits and Capability contract between the model and platform backends. Depends only on net-lattice-core — never on net-lattice-model.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use net_lattice_core::Result;

/// 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.
///
/// This trait is read-only. See [`InterfaceMutator`](crate::InterfaceMutator)
/// for the complementary administrative-state and MTU configuration contract.
pub trait InterfaceProvider {
    type Interface;

    fn interfaces(&self) -> Result<Vec<Self::Interface>>;
}