pub enum NetworkType {
Mobile(NetworkTypeMobile),
MobileRoaming(NetworkTypeMobileRoaming),
None(NetworkTypeNone),
Other(NetworkTypeOther),
WiFi(NetworkTypeWiFi),
// some variants omitted
}
Expand description
Represents the type of a network
Variants§
Mobile(NetworkTypeMobile)
A mobile network
MobileRoaming(NetworkTypeMobileRoaming)
A mobile roaming network
None(NetworkTypeNone)
The network is not available
Other(NetworkTypeOther)
A different network type (e.g., Ethernet network)
WiFi(NetworkTypeWiFi)
A Wi-Fi network
Implementations§
Trait Implementations§
Source§impl AsRef<NetworkType> for NetworkType
impl AsRef<NetworkType> for NetworkType
Source§fn as_ref(&self) -> &NetworkType
fn as_ref(&self) -> &NetworkType
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for NetworkType
impl Clone for NetworkType
Source§fn clone(&self) -> NetworkType
fn clone(&self) -> NetworkType
Returns a copy of the value. Read more
1.0.0 · 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 NetworkType
impl Debug for NetworkType
Source§impl Default for NetworkType
impl Default for NetworkType
Source§fn default() -> NetworkType
fn default() -> NetworkType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NetworkType
impl<'de> Deserialize<'de> for NetworkType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NetworkType
impl RefUnwindSafe for NetworkType
impl Send for NetworkType
impl Sync for NetworkType
impl Unpin for NetworkType
impl UnwindSafe for NetworkType
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