Skip to main content

Module network_status

Module network_status 

Source
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§

NetworkStatus
A snapshot of the current network state.

Traits§

NetworkMonitor
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.

Type Aliases§

NetworkMonitorRef