systemd-zbus 5.3.0

A dbus client (using zbus) for systemd
Documentation
//! # DBus interface proxies for: `org.freedesktop.systemd1.Scope`
//!
//! This code was generated by `zbus-xmlgen` `3.1.0` from DBus introspection data.
//! Source: `org.freedesktop.systemd1.Scope.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::Process;

#[proxy(
    interface = "org.freedesktop.systemd1.Scope",
    default_service = "org.freedesktop.systemd1"
)]
pub trait Scope {
    /// Abandon method
    fn abandon(&self) -> zbus::Result<()>;

    /// AttachProcesses method
    fn attach_processes(&self, subcgroup: &str, pids: &[u32]) -> zbus::Result<()>;

    /// GetProcesses method
    fn get_processes(&self) -> zbus::Result<Vec<Process>>;

    /// RequestStop signal
    #[zbus(signal)]
    fn request_stop(&self) -> zbus::Result<()>;

    /// AllowedCPUs property
    #[zbus(property, name = "AllowedCPUs")]
    fn allowed_cpus(&self) -> zbus::Result<Vec<u8>>;

    /// AllowedMemoryNodes property
    #[zbus(property)]
    fn allowed_memory_nodes(&self) -> zbus::Result<Vec<u8>>;

    /// BPFProgram property
    #[zbus(property, name = "BPFProgram")]
    fn bpf_program(&self) -> zbus::Result<Vec<(String, String)>>;

    /// BlockIOAccounting property
    #[zbus(property, name = "BlockIOAccounting")]
    fn block_io_accounting(&self) -> zbus::Result<bool>;

    /// BlockIODeviceWeight property
    #[zbus(property, name = "BlockIODeviceWeight")]
    fn block_io_device_weight(&self) -> zbus::Result<Vec<(String, u64)>>;

    /// BlockIOReadBandwidth property
    #[zbus(property, name = "BlockIOReadBandwidth")]
    fn block_io_read_bandwidth(&self) -> zbus::Result<Vec<(String, u64)>>;

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

    /// BlockIOWriteBandwidth property
    #[zbus(property, name = "BlockIOWriteBandwidth")]
    fn block_io_write_bandwidth(&self) -> zbus::Result<Vec<(String, u64)>>;

    /// CPUAccounting property
    #[zbus(property, name = "CPUAccounting")]
    fn cpu_accounting(&self) -> zbus::Result<bool>;

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

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

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

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

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

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

    /// ControlGroupId property
    #[zbus(property)]
    fn control_group_id(&self) -> zbus::Result<u64>;

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

    /// DefaultMemoryLow property
    #[zbus(property)]
    fn default_memory_low(&self) -> zbus::Result<u64>;

    /// DefaultMemoryMin property
    #[zbus(property)]
    fn default_memory_min(&self) -> zbus::Result<u64>;

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

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

    /// DeviceAllow property
    #[zbus(property)]
    fn device_allow(&self) -> zbus::Result<Vec<(String, String)>>;

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

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

    /// EffectiveCPUs property
    #[zbus(property, name = "EffectiveCPUs")]
    fn effective_cpus(&self) -> zbus::Result<Vec<u8>>;

    /// EffectiveMemoryNodes property
    #[zbus(property)]
    fn effective_memory_nodes(&self) -> zbus::Result<Vec<u8>>;

    /// FinalKillSignal property
    #[zbus(property)]
    fn final_kill_signal(&self) -> zbus::Result<i32>;

    /// IOAccounting property
    #[zbus(property, name = "IOAccounting")]
    fn io_accounting(&self) -> zbus::Result<bool>;

    /// IODeviceLatencyTargetUSec property
    #[zbus(property, name = "IODeviceLatencyTargetUSec")]
    fn io_device_latency_target_usec(&self) -> zbus::Result<Vec<(String, u64)>>;

    /// IODeviceWeight property
    #[zbus(property, name = "IODeviceWeight")]
    fn io_device_weight(&self) -> zbus::Result<Vec<(String, u64)>>;

    /// IOReadBandwidthMax property
    #[zbus(property, name = "IOReadBandwidthMax")]
    fn io_read_bandwidth_max(&self) -> zbus::Result<Vec<(String, u64)>>;

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

    /// IOReadIOPSMax property
    #[zbus(property, name = "IOReadIOPSMax")]
    fn io_read_iops_max(&self) -> zbus::Result<Vec<(String, u64)>>;

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

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

    /// IOWriteBandwidthMax property
    #[zbus(property, name = "IOWriteBandwidthMax")]
    fn io_write_bandwidth_max(&self) -> zbus::Result<Vec<(String, u64)>>;

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

    /// IOWriteIOPSMax property
    #[zbus(property, name = "IOWriteIOPSMax")]
    fn io_write_iops_max(&self) -> zbus::Result<Vec<(String, u64)>>;

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

    /// IPAccounting property
    #[zbus(property, name = "IPAccounting")]
    fn ip_accounting(&self) -> zbus::Result<bool>;

    /// IPAddressAllow property
    #[zbus(property, name = "IPAddressAllow")]
    fn ip_address_allow(&self) -> zbus::Result<Vec<(i32, Vec<u8>, u32)>>;

    /// IPAddressDeny property
    #[zbus(property, name = "IPAddressDeny")]
    fn ipaddress_deny(&self) -> zbus::Result<Vec<(i32, Vec<u8>, u32)>>;

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

    /// IPEgressFilterPath property
    #[zbus(property, name = "IPEgressFilterPath")]
    fn ip_egress_filter_path(&self) -> zbus::Result<Vec<String>>;

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

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

    /// IPIngressFilterPath property
    #[zbus(property, name = "IPIngressFilterPath")]
    fn ip_ingress_filter_path(&self) -> zbus::Result<Vec<String>>;

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

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

    /// KillSignal property
    #[zbus(property)]
    fn kill_signal(&self) -> zbus::Result<i32>;

    /// ManagedOOMMemoryPressure property
    #[zbus(property, name = "ManagedOOMMemoryPressure")]
    fn managed_oom_memory_pressure(&self) -> zbus::Result<String>;

    /// ManagedOOMMemoryPressureLimit property
    #[zbus(property, name = "ManagedOOMMemoryPressureLimit")]
    fn managed_oom_memory_pressure_limit(&self) -> zbus::Result<u32>;

    /// ManagedOOMPreference property
    #[zbus(property, name = "ManagedOOMPreference")]
    fn managed_oom_preference(&self) -> zbus::Result<String>;

    /// ManagedOOMSwap property
    #[zbus(property, name = "ManagedOOMSwap")]
    fn managed_oom_swap(&self) -> zbus::Result<String>;

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

    /// MemoryAvailable property
    #[zbus(property)]
    fn memory_available(&self) -> zbus::Result<u64>;

    /// MemoryCurrent property
    #[zbus(property)]
    fn memory_current(&self) -> zbus::Result<u64>;

    /// MemoryHigh property
    #[zbus(property)]
    fn memory_high(&self) -> zbus::Result<u64>;

    /// MemoryLimit property
    #[zbus(property)]
    fn memory_limit(&self) -> zbus::Result<u64>;

    /// MemoryLow property
    #[zbus(property)]
    fn memory_low(&self) -> zbus::Result<u64>;

    /// MemoryMax property
    #[zbus(property)]
    fn memory_max(&self) -> zbus::Result<u64>;

    /// MemoryMin property
    #[zbus(property)]
    fn memory_min(&self) -> zbus::Result<u64>;

    /// MemorySwapMax property
    #[zbus(property)]
    fn memory_swap_max(&self) -> zbus::Result<u64>;

    /// RestartKillSignal property
    #[zbus(property)]
    fn restart_kill_signal(&self) -> zbus::Result<i32>;

    /// RestrictNetworkInterfaces property
    #[zbus(property)]
    fn restrict_network_interfaces(&self) -> zbus::Result<(bool, Vec<String>)>;

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

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

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

    /// SendSIGHUP property
    #[zbus(property, name = "SendSIGHUP")]
    fn send_sighup(&self) -> zbus::Result<bool>;

    /// SendSIGKILL property
    #[zbus(property, name = "SendSIGKILL")]
    fn send_sigkill(&self) -> zbus::Result<bool>;

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

    /// SocketBindAllow property
    #[zbus(property)]
    fn socket_bind_allow(&self) -> zbus::Result<Vec<(i32, i32, u16, u16)>>;

    /// SocketBindDeny property
    #[zbus(property)]
    fn socket_bind_deny(&self) -> zbus::Result<Vec<(i32, i32, u16, u16)>>;

    /// StartupAllowedCPUs property
    #[zbus(property, name = "StartupAllowedCPUs")]
    fn startup_allowed_cpus(&self) -> zbus::Result<Vec<u8>>;

    /// StartupAllowedMemoryNodes property
    #[zbus(property)]
    fn startup_allowed_memory_nodes(&self) -> zbus::Result<Vec<u8>>;

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

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

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

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

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

    /// TasksCurrent property
    #[zbus(property)]
    fn tasks_current(&self) -> zbus::Result<u64>;

    /// TasksMax property
    #[zbus(property)]
    fn tasks_max(&self) -> zbus::Result<u64>;

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

    /// WatchdogSignal property
    #[zbus(property)]
    fn watchdog_signal(&self) -> zbus::Result<i32>;
}