rusty_network_manager/network_manager/
adsl.rs

1//! # D-Bus interface proxy for: `org.freedesktop.NetworkManager.Device.Adsl`
2//!
3//! This code was generated by `zbus-xmlgen` `4.0.1` from D-Bus introspection data.
4//! Source: `org.freedesktop.NetworkManager.Device.Adsl.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,
14
15use zbus::{Connection, Result, proxy};
16
17impl AdslProxy<'_> {
18    pub async fn new_from_path(
19        device_path: zbus::zvariant::OwnedObjectPath,
20        connection: &Connection,
21    ) -> Result<AdslProxy<'_>> {
22        AdslProxy::builder(connection)
23            .path(device_path)?
24            .build()
25            .await
26    }
27}
28
29#[proxy(
30    default_path = "/org/freedesktop/NetworkManager/Device/Adsl",
31    default_service = "org.freedesktop.NetworkManager",
32    interface = "org.freedesktop.NetworkManager.Device.Adsl",
33    assume_defaults = true
34)]
35pub trait Adsl {
36    /// Carrier property
37    #[zbus(property)]
38    fn carrier(&self) -> zbus::Result<bool>;
39}