bluez-generated 0.3.0

Generated async D-Bus bindings for talking to BlueZ on Linux.
Documentation
// This code was autogenerated with `dbus-codegen-rust --file=specs/org.bluez.GattService1.xml --interfaces=org.bluez.GattService1 --client=nonblock --methodtype=none --prop-newtype`, see https://github.com/diwic/dbus-rs
#[allow(unused_imports)]
use dbus::arg;
use dbus::nonblock;

pub trait OrgBluezGattService1 {
    fn uuid(&self) -> nonblock::MethodReply<String>;
    fn device(&self) -> nonblock::MethodReply<dbus::Path<'static>>;
    fn primary(&self) -> nonblock::MethodReply<bool>;
    fn includes(&self) -> nonblock::MethodReply<Vec<dbus::Path<'static>>>;
}

pub const ORG_BLUEZ_GATT_SERVICE1_NAME: &str = "org.bluez.GattService1";

#[derive(Copy, Clone, Debug)]
pub struct OrgBluezGattService1Properties<'a>(pub &'a arg::PropMap);

impl<'a> OrgBluezGattService1Properties<'a> {
    pub fn from_interfaces(
        interfaces: &'a ::std::collections::HashMap<String, arg::PropMap>,
    ) -> Option<Self> {
        interfaces.get("org.bluez.GattService1").map(Self)
    }

    pub fn uuid(&self) -> Option<&String> {
        arg::prop_cast(self.0, "UUID")
    }

    pub fn device(&self) -> Option<&dbus::Path<'static>> {
        arg::prop_cast(self.0, "Device")
    }

    pub fn primary(&self) -> Option<bool> {
        arg::prop_cast(self.0, "Primary").copied()
    }

    pub fn includes(&self) -> Option<&Vec<dbus::Path<'static>>> {
        arg::prop_cast(self.0, "Includes")
    }
}

impl<'a, T: nonblock::NonblockReply, C: ::std::ops::Deref<Target = T>> OrgBluezGattService1
    for nonblock::Proxy<'a, C>
{
    fn uuid(&self) -> nonblock::MethodReply<String> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.GattService1",
            "UUID",
        )
    }

    fn device(&self) -> nonblock::MethodReply<dbus::Path<'static>> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.GattService1",
            "Device",
        )
    }

    fn primary(&self) -> nonblock::MethodReply<bool> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.GattService1",
            "Primary",
        )
    }

    fn includes(&self) -> nonblock::MethodReply<Vec<dbus::Path<'static>>> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.GattService1",
            "Includes",
        )
    }
}