net-lattice-platform 0.10.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
18
use net_lattice_core::Result;

/// Lists neighbor table entries (ARP for IPv4, NDP for IPv6).
///
/// Generic over an associated `NeighborEntry` type rather than naming
/// `net_lattice_model::neighbor::NeighborEntry` directly — `net-lattice-platform`
/// does not depend on `net-lattice-model` (see ARCHITECTURE.md). The facade
/// crate (`net-lattice`) is what constrains `NeighborEntry` to the concrete
/// model type.
///
/// Read-only for now, like [`InterfaceProvider`](crate::InterfaceProvider) and
/// [`DnsProvider`](crate::DnsProvider): adding/removing static neighbor
/// entries is a separate concern deferred to a later stage.
pub trait NeighborProvider {
    type NeighborEntry;

    fn neighbors(&self) -> Result<Vec<Self::NeighborEntry>>;
}