passcod_networkmanager/devices/veth.rs
1// Virtual Ethernet Device
2
3use super::Device;
4use super::VethDevice;
5use crate::gen::OrgFreedesktopNetworkManagerDeviceVeth;
6use crate::Error;
7
8pub trait Veth {
9 fn peer(&self) -> Result<Device, Error>;
10}
11
12impl Veth for VethDevice {
13 fn peer(&self) -> Result<Device, Error> {
14 let path = proxy!(self).peer()?;
15 Device::new(self.dbus_accessor.with_path(path))
16 }
17}