1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Virtual Ethernet Device

use super::Device;
use super::VethDevice;
use crate::gen::OrgFreedesktopNetworkManagerDeviceVeth;
use crate::Error;

pub trait Veth {
    fn peer(&self) -> Result<Device, Error>;
}

impl Veth for VethDevice {
    fn peer(&self) -> Result<Device, Error> {
        let path = proxy!(self).peer()?;
        Device::new(self.dbus_accessor.with_path(path))
    }
}