pub enum NetworkKind {
Wifi,
Cellular,
Ethernet,
Other,
None,
}Expand description
The transport class of the active network connection. Best-effort — not every platform can
distinguish these (see NetworkStatus::kind).
Variants§
Wifi
Wi-Fi (or, on iOS, any non-cellular transport — reachability can’t tell Wi-Fi from wired).
Cellular
A cellular / mobile-data connection.
Ethernet
Wired ethernet.
Other
Connected, but the transport is unknown or something else (VPN, bluetooth tether, …).
None
No active network connection.
Trait Implementations§
Source§impl Clone for NetworkKind
impl Clone for NetworkKind
Source§fn clone(&self) -> NetworkKind
fn clone(&self) -> NetworkKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NetworkKind
impl Debug for NetworkKind
Source§impl Default for NetworkKind
impl Default for NetworkKind
Source§fn default() -> NetworkKind
fn default() -> NetworkKind
Returns the “default value” for a type. Read more
Source§impl PartialEq for NetworkKind
impl PartialEq for NetworkKind
Source§fn eq(&self, other: &NetworkKind) -> bool
fn eq(&self, other: &NetworkKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for NetworkKind
impl Eq for NetworkKind
impl StructuralPartialEq for NetworkKind
Auto Trait Implementations§
impl Freeze for NetworkKind
impl RefUnwindSafe for NetworkKind
impl Send for NetworkKind
impl Sync for NetworkKind
impl Unpin for NetworkKind
impl UnsafeUnpin for NetworkKind
impl UnwindSafe for NetworkKind
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