Struct omnisensor::powerstate::host_state::DBusPowerStateProperty
source · [−]pub struct DBusPowerStateProperty {
pub busname: &'static str,
pub path: &'static str,
pub interface: &'static str,
pub property: &'static str,
pub power_state: PowerState,
pub is_active: fn(s: &str) -> bool,
pub update: fn(st: &mut HostState, new: bool),
}
Expand description
A collection of information pertaining to the dbus representation of an attribute of host power state.
Fields
busname: &'static str
The bus name of the service from which we obtain the current state.
path: &'static str
The path of the object we retrieve the state from.
interface: &'static str
The interface of the object via which we retrieve the state.
property: &'static str
The specific property within the interface that we query to retrieve the state.
power_state: PowerState
Which PowerState
this property pertains to. The datatype here is a slight
kludge in that PowerState
is mostly intended to represent a setting of a
sensor rather than something about the host, but it’s a close-enough fit that
I’m reusing it at least for now…
is_active: fn(s: &str) -> bool
How to map the string retrieved from dbus to the on/off state of the attribute.
update: fn(st: &mut HostState, new: bool)
How to update this property within a HostState
.
Implementations
Auto Trait Implementations
impl RefUnwindSafe for DBusPowerStateProperty
impl Send for DBusPowerStateProperty
impl Sync for DBusPowerStateProperty
impl Unpin for DBusPowerStateProperty
impl UnwindSafe for DBusPowerStateProperty
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more