pub struct NetworkDevice {
pub path: String,
pub interface: String,
pub kind: NetworkKind,
pub state: NetworkState,
pub connection: String,
pub fail_reason: Option<ConnectionFailReason>,
pub wifi_mode: WifiMode,
pub link_speed: u32,
pub has_link: bool,
}Expand description
A network device NetworkManager manages, other than loopback.
Fields§
§path: StringNetworkManager’s object path for it, which names it while it exists.
interface: StringIts interface, such as wlan0.
kind: NetworkKindWhat it is.
state: NetworkStateHow it is doing.
connection: StringThe name of its active connection, or "".
fail_reason: Option<ConnectionFailReason>Why its last try to connect failed, kept until it tries again.
None if it hasn’t failed since the shell started following it.
wifi_mode: WifiModeWhat it does, for a Wi-Fi device; Unknown for any other.
link_speed: u32For a wired device, its link’s speed in Mb/s; 0 when not known, and for any other device.
has_link: boolFor a wired device, whether a cable is in, from the carrier bit of
InterfaceFlags, or Carrier before NetworkManager 1.22; false
for any other.
Trait Implementations§
Source§impl Clone for NetworkDevice
impl Clone for NetworkDevice
Source§impl Debug for NetworkDevice
impl Debug for NetworkDevice
Source§impl PartialEq for NetworkDevice
impl PartialEq for NetworkDevice
impl StructuralPartialEq for NetworkDevice
Auto Trait Implementations§
impl Forget for NetworkDevice
impl Freeze for NetworkDevice
impl Move for NetworkDevice
impl RefUnwindSafe for NetworkDevice
impl Send for NetworkDevice
impl Sync for NetworkDevice
impl Unpin for NetworkDevice
impl UnsafeUnpin for NetworkDevice
impl UnwindSafe for NetworkDevice
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