rusty_network_manager/network_manager/
vlan.rs1use zbus::{Connection, Result, proxy};
15
16impl VlanProxy<'_> {
17 pub async fn new_from_path(
18 device_path: zbus::zvariant::OwnedObjectPath,
19 connection: &Connection,
20 ) -> Result<VlanProxy<'_>> {
21 VlanProxy::builder(connection)
22 .path(device_path)?
23 .build()
24 .await
25 }
26}
27
28#[proxy(
29 default_path = "/org/freedesktop/NetworkManager/Device/Vlan",
30 default_service = "org.freedesktop.NetworkManager",
31 interface = "org.freedesktop.NetworkManager.Device.Vlan",
32 assume_defaults = true
33)]
34pub trait Vlan {
35 #[zbus(property)]
37 fn carrier(&self) -> zbus::Result<bool>;
38
39 #[zbus(property)]
41 fn hw_address(&self) -> zbus::Result<String>;
42
43 #[zbus(property)]
45 fn parent(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
46
47 #[zbus(property)]
49 fn vlan_id(&self) -> zbus::Result<u32>;
50}