#[non_exhaustive]pub enum DeviceType {
Ethernet,
Wifi,
WifiP2P,
Loopback,
Bluetooth,
Other(u32),
}Expand description
NetworkManager device types.
Represents the type of network hardware managed by NetworkManager. This enum uses a registry-based system to support adding new device types without breaking the API.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ethernet
Wired Ethernet device.
Wifi
Wi-Fi (802.11) wireless device.
WifiP2P
Wi-Fi P2P (peer-to-peer) device.
Loopback
Loopback device (localhost).
Bluetooth
Bluetooth
Other(u32)
Unknown or unsupported device type with raw code.
Use the methods on DeviceType to query capabilities of unknown device types,
which will consult the internal device type registry.
Implementations§
Source§impl DeviceType
impl DeviceType
Sourcepub fn supports_scanning(&self) -> bool
pub fn supports_scanning(&self) -> bool
Returns whether this device type supports network scanning.
Currently only WiFi and WiFi P2P devices support scanning. For unknown device types, consults the internal device type registry.
Sourcepub fn requires_specific_object(&self) -> bool
pub fn requires_specific_object(&self) -> bool
Returns whether this device type requires a specific object (like an access point).
WiFi devices require an access point to connect to, while Ethernet can connect without a specific target. For unknown device types, consults the internal device type registry.
Sourcepub fn has_global_enabled_state(&self) -> bool
pub fn has_global_enabled_state(&self) -> bool
Returns whether this device type has a global enabled/disabled state.
WiFi has a global radio killswitch that can enable/disable all WiFi devices. For unknown device types, consults the internal device type registry.
Sourcepub fn connection_type_str(&self) -> &'static str
pub fn connection_type_str(&self) -> &'static str
Returns the NetworkManager connection type string for this device.
This is used when creating connection profiles for this device type. For unknown device types, consults the internal device type registry.
Trait Implementations§
Source§impl Clone for DeviceType
impl Clone for DeviceType
Source§fn clone(&self) -> DeviceType
fn clone(&self) -> DeviceType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more