Expand description
Network status (connectivity + whether the connection is metered). Apps use it to defer or confirm large transfers on cellular/metered links.
The default reports online + unmetered; platform backends can install a real
monitor via set_platform_network_monitor (iOS NWPathMonitor, Android
ConnectivityManager, web navigator.connection).
Structs§
- Network
Status - A snapshot of the current network state.
Traits§
- Network
Monitor - Reports the current network status.
Functions§
- clear_
platform_ network_ monitor - Removes any registered platform network monitor (tests and teardown).
- network_
monitor - The active network monitor: the platform one if installed, else the default (online, unmetered).
- network_
status - Convenience: the current network status.
- set_
platform_ network_ monitor - Installs a platform network monitor, replacing any previous one.