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;

/// Reads the system's current DNS resolver configuration.
///
/// Generic over an associated `DnsConfig` type rather than naming
/// `net_lattice_model::dns::DnsConfig` directly — `net-lattice-platform`
/// does not depend on `net-lattice-model` (see ARCHITECTURE.md). The facade
/// crate (`net-lattice`) is what constrains `DnsConfig` to the concrete
/// model type.
///
/// See [`DnsMutator`](crate::DnsMutator) for the complementary mutation
/// contract. Together these traits form the official DNS extension API for
/// third-party backends.
pub trait DnsProvider {
    type DnsConfig;

    fn dns_config(&self) -> Result<Self::DnsConfig>;
}