pub enum NetworkStatus {
Online,
Offline,
Wifi,
Cellular,
Unknown,
}Expand description
Normalized network reachability and transport classification.
Variants§
Online
Network connectivity is available (generic online transport).
Offline
Device has no active network route.
Wifi
Connected over Wi-Fi / local wireless LAN.
Cellular
Connected over cellular mobile data.
Unknown
Connectivity state could not be determined by the host OS.
Implementations§
Trait Implementations§
Source§impl Clone for NetworkStatus
impl Clone for NetworkStatus
impl Copy for NetworkStatus
Source§impl Debug for NetworkStatus
impl Debug for NetworkStatus
Source§impl Default for NetworkStatus
impl Default for NetworkStatus
impl Eq for NetworkStatus
Source§impl Hash for NetworkStatus
impl Hash for NetworkStatus
Source§impl Ord for NetworkStatus
impl Ord for NetworkStatus
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for NetworkStatus
impl PartialEq for NetworkStatus
Source§impl PartialOrd for NetworkStatus
impl PartialOrd for NetworkStatus
impl StructuralPartialEq for NetworkStatus
Auto Trait Implementations§
impl Forget for NetworkStatus
impl Freeze for NetworkStatus
impl Move for NetworkStatus
impl RefUnwindSafe for NetworkStatus
impl Send for NetworkStatus
impl Sync for NetworkStatus
impl Unpin for NetworkStatus
impl UnsafeUnpin for NetworkStatus
impl UnwindSafe for NetworkStatus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more