udisks2 0.3.1

Unofficial crate for interacting with the UDisks2 API
Documentation
//! # DBus interface proxy for: `org.freedesktop.UDisks2.Loop`
//!
//! This code was generated by `zbus-xmlgen` `4.0.0` from DBus introspection data.
//! Source: `org.freedesktop.UDisks2.xml`.
//!
//! You may prefer to adapt it, instead of using it verbatim.
//!
//! More information can be found in the
//! [Writing a client proxy](https://dbus2.github.io/zbus/client.html)
//! section of the zbus documentation.
//!

use zbus::proxy;

use crate::error;

#[proxy(
    interface = "org.freedesktop.UDisks2.Loop",
    default_service = "org.freedesktop.UDisks2",
    default_path = "/org/freedesktop/UDisks2/Loop"
)]
pub trait Loop {
    /// Delete method
    fn delete(
        &self,
        options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
    ) -> error::Result<()>;

    /// SetAutoclear method
    fn set_autoclear(
        &self,
        value: bool,
        options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
    ) -> error::Result<()>;

    /// Autoclear property
    #[zbus(property)]
    fn autoclear(&self) -> error::Result<bool>;

    /// BackingFile property
    #[zbus(property)]
    fn backing_file(&self) -> error::Result<Vec<u8>>;

    /// SetupByUID property
    #[zbus(property, name = "SetupByUID")]
    fn setup_by_uid(&self) -> error::Result<u32>;
}