pub enum SensorMode {
    ReadOnly,
    ReadWrite(Box<dyn Fn(&Sensor, f64) + Send>),
}
Expand description

A sensor’s (dbus) read-only or read-write mode.

Variants

ReadOnly

The sensor’s value is read-only via dbus.

ReadWrite(Box<dyn Fn(&Sensor, f64) + Send>)

The sensor’s value can be written via dbus.

The boxed callback will be called when a dbus write occurs.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.