systemd-zbus 5.3.0

A dbus client (using zbus) for systemd
Documentation
//! # DBus interface proxies for: `org.freedesktop.systemd1.Timer`
//!
//! This code was generated by `zbus-xmlgen` `3.1.0` from DBus introspection data.
//! Source: `org.freedesktop.systemd1.Timer.xml`.
//!
//! You may prefer to adapt it, instead of using it verbatim.
//!
//! More information can be found in the
//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html)
//! section of the zbus documentation.
//!
//! This DBus object implements
//! [standard DBus interfaces](https://dbus.freedesktop.org/doc/dbus-specification.html),
//! (`org.freedesktop.DBus.*`) for which the following zbus proxies can be used:
//!
//! * [`zbus::fdo::PeerProxy`]
//! * [`zbus::fdo::IntrospectableProxy`]
//! * [`zbus::fdo::PropertiesProxy`]
//!
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.

use zbus::proxy;

use crate::{TimerCalendar, TimerMonotonic};

#[proxy(
    interface = "org.freedesktop.systemd1.Timer",
    default_service = "org.freedesktop.systemd1"
)]
pub trait Timer {
    /// AccuracyUSec property
    #[zbus(property, name = "AccuracyUSec")]
    fn accuracy_usec(&self) -> zbus::Result<u64>;

    /// FixedRandomDelay property
    #[zbus(property)]
    fn fixed_random_delay(&self) -> zbus::Result<bool>;

    /// LastTriggerUSec property
    #[zbus(property, name = "LastTriggerUSec")]
    fn last_trigger_usec(&self) -> zbus::Result<u64>;

    /// LastTriggerUSecMonotonic property
    #[zbus(property, name = "LastTriggerUSecMonotonic")]
    fn last_trigger_usec_monotonic(&self) -> zbus::Result<u64>;

    /// NextElapseUSecMonotonic property
    #[zbus(property, name = "NextElapseUSecMonotonic")]
    fn next_elapse_usec_monotonic(&self) -> zbus::Result<u64>;

    /// NextElapseUSecRealtime property
    #[zbus(property, name = "NextElapseUSecRealtime")]
    fn next_elapse_usec_realtime(&self) -> zbus::Result<u64>;

    /// OnClockChange property
    #[zbus(property)]
    fn on_clock_change(&self) -> zbus::Result<bool>;

    /// OnTimezoneChange property
    #[zbus(property)]
    fn on_timezone_change(&self) -> zbus::Result<bool>;

    /// Persistent property
    #[zbus(property)]
    fn persistent(&self) -> zbus::Result<bool>;

    /// RandomizedDelayUSec property
    #[zbus(property, name = "RandomizedDelayUSec")]
    fn randomized_delay_usec(&self) -> zbus::Result<u64>;

    /// RemainAfterElapse property
    #[zbus(property)]
    fn remain_after_elapse(&self) -> zbus::Result<bool>;

    /// Result property
    #[zbus(property)]
    fn result(&self) -> zbus::Result<String>;

    /// TimersCalendar property
    #[zbus(property)]
    fn timers_calendar(&self) -> zbus::Result<Vec<TimerCalendar>>;

    /// TimersMonotonic property
    #[zbus(property)]
    fn timers_monotonic(&self) -> zbus::Result<Vec<TimerMonotonic>>;

    /// Unit property
    #[zbus(property)]
    fn unit(&self) -> zbus::Result<String>;

    /// WakeSystem property
    #[zbus(property)]
    fn wake_system(&self) -> zbus::Result<bool>;
}