rusty_network_manager/network_manager/
vlan.rs

1//! # D-Bus interface proxy for: `org.freedesktop.NetworkManager.Device.Vlan`
2//!
3//! This code was generated by `zbus-xmlgen` `4.0.1` from D-Bus introspection data.
4//! Source: `org.freedesktop.NetworkManager.Device.Vlan.xml`.
5//!
6//! You may prefer to adapt it, instead of using it verbatim.
7//!
8//! More information can be found in the [Writing a client proxy] section of the zbus
9//! documentation.
10//!
11//!
12//! [Writing a client proxy]: https://dbus2.github.io/zbus/client.html
13//! [D-Bus standard interfaces]: https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces,
14use 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    /// Carrier property
36    #[zbus(property)]
37    fn carrier(&self) -> zbus::Result<bool>;
38
39    /// HwAddress property
40    #[zbus(property)]
41    fn hw_address(&self) -> zbus::Result<String>;
42
43    /// Parent property
44    #[zbus(property)]
45    fn parent(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
46
47    /// VlanId property
48    #[zbus(property)]
49    fn vlan_id(&self) -> zbus::Result<u32>;
50}