pub enum NetworkStatus {
Unavailable,
Available,
}Expand description
Current host-level network reachability reported by the monitor.
Evidence differs by platform: Windows uses Network List Manager’s Internet connectivity flags; macOS uses netwatch’s default-route and IP-capability facts; Linux checks operational interfaces and default routes. These are host observations, not probes of a particular server, DNS service, or URL. Always handle errors from the actual network operation.
An absent NetworkSnapshot::reachability means no current observation, not
Unavailable. Stopped, Starting, Failed, and Closed describe the
monitor’s lifecycle and must not be converted into a network disconnection.
Variants§
The platform observation does not establish host network availability. This does not imply that every local or remote endpoint is unreachable.
Available
The platform observation indicates host network availability. A request can still fail because of DNS, TLS, a firewall, or the server.
Implementations§
Source§impl NetworkStatus
impl NetworkStatus
Sourcepub const fn name(&self) -> &'static str
pub const fn name(&self) -> &'static str
The variant name as a static string (e.g. "Available").
Used both by the fmt::Display implementation and as a stable,
human-readable label when forwarding the status to logging.