passcod_networkmanager/devices/
wired.rs1use super::EthernetDevice;
2use crate::gen::OrgFreedesktopNetworkManagerDeviceWired;
3use crate::Error;
4
5pub trait Wired {
6 fn hw_address(&self) -> Result<String, Error>;
7 fn perm_hw_address(&self) -> Result<String, Error>;
8 fn speed(&self) -> Result<u32, Error>;
9 fn s390_subchannels(&self) -> Result<Vec<String>, Error>;
10 fn carrier(&self) -> Result<bool, Error>;
11}
12
13impl Wired for EthernetDevice {
14 fn hw_address(&self) -> Result<String, Error> {
15 Ok(proxy!(self).hw_address()?)
16 }
17 fn perm_hw_address(&self) -> Result<String, Error> {
18 Ok(proxy!(self).perm_hw_address()?)
19 }
20 fn speed(&self) -> Result<u32, Error> {
21 Ok(proxy!(self).speed()?)
22 }
23 fn s390_subchannels(&self) -> Result<Vec<String>, Error> {
24 Ok(proxy!(self).s390_subchannels()?)
25 }
26 fn carrier(&self) -> Result<bool, Error> {
27 Ok(proxy!(self).carrier()?)
28 }
29}