1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! # DBus interface proxy for: `org.freedesktop.UDisks2.Swapspace`
//!
//! 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.Swapspace",
default_service = "org.freedesktop.UDisks2",
default_path = "/org/freedesktop/UDisks2/Swapspace"
)]
pub trait Swapspace {
/// SetLabel method
fn set_label(
&self,
label: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
/// SetUUID method
#[zbus(name = "SetUUID")]
fn set_uuid(
&self,
uuid: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
/// Start method
fn start(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
/// Stop method
fn stop(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
/// Active property
#[zbus(property)]
fn active(&self) -> error::Result<bool>;
}