net-lattice-platform
Generic provider traits and runtime capability contracts between Net Lattice's public facade and native platform backends.
What it provides
- generic inspection and mutation provider traits using associated types,
including
InterfaceMutatorfor desired administrative-state and MTU patches; - runtime
Capabilityreporting; - synchronous event sender/receiver contracts;
- optional native Tokio watcher contracts behind the
asyncfeature.
This crate intentionally depends on net-lattice-core, not
net-lattice-model. The facade binds provider associated types to the
workspace's concrete domain model. Application code normally uses
net-lattice; backend authors depend on this crate directly.
Usage
use ;
Contract notes
Capabilities report implemented runtime surfaces. They do not guarantee that
the current process has native privileges or that state cannot change between
validation and submission. In particular,
Capability::INTERFACE_ADMIN_STATE and Capability::INTERFACE_MTU gate a
backend's interface-configuration surface independently; a caller requesting
both settings must require both flags.
Monitoring is also domain-specific: ROUTE_MONITORING,
INTERFACE_MONITORING, NEIGHBOR_MONITORING, and ADDRESS_MONITORING each
mean that the backend has a native delivery path for that domain.
MONITORING is their all-domain aggregate, not merely proof that some watcher
can be constructed.