Struct omnisensor::DaemonState
source · [−]pub struct DaemonState {
pub(crate) config: Mutex<HashMap<Arc<InventoryPath>, SensorConfig>>,
pub(crate) sensors: Mutex<HashMap<String, Arc<Mutex<Sensor>>>>,
pub(crate) i2cdevs: Mutex<HashMap<I2CDeviceParams, Weak<I2CDevice>>>,
pub(crate) bus: Arc<SyncConnection>,
pub(crate) crossroads: SyncMutex<Crossroads>,
pub(crate) sensor_intfs: SensorIntfData,
}
Expand description
Global daemon-wide state
Fields
config: Mutex<HashMap<Arc<InventoryPath>, SensorConfig>>
Our collected, parsed (structured) sensor config data.
sensors: Mutex<HashMap<String, Arc<Mutex<Sensor>>>>
All extant sensors, by name (active and inactive alike).
i2cdevs: Mutex<HashMap<I2CDeviceParams, Weak<I2CDevice>>>
All managed (dynamic) I2C devices.
bus: Arc<SyncConnection>
Our dbus connection.
crossroads: SyncMutex<Crossroads>
dbus object server registry…thing.
sensor_intfs: SensorIntfData
Sensor dbus interface metadata.
Auto Trait Implementations
impl !RefUnwindSafe for DaemonState
impl Send for DaemonState
impl Sync for DaemonState
impl Unpin for DaemonState
impl !UnwindSafe for DaemonState
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