pub enum Command {
LoadCachedData,
Scan {
duration: Duration,
},
Connect {
device_id: String,
},
Disconnect {
device_id: String,
},
RefreshReading {
device_id: String,
},
RefreshAll,
SyncHistory {
device_id: String,
},
SetInterval {
device_id: String,
interval_secs: u16,
},
SetBluetoothRange {
device_id: String,
extended: bool,
},
SetSmartHome {
device_id: String,
enabled: bool,
},
Shutdown,
}Expand description
Commands sent from the UI thread to the background worker.
These commands represent user-initiated actions that require Bluetooth operations or other background processing.
Variants§
LoadCachedData
Load cached devices and readings from the store on startup.
Scan
Scan for nearby Aranet devices.
Connect
Connect to a specific device.
Disconnect
Disconnect from a specific device.
RefreshReading
Refresh the current reading for a single device.
RefreshAll
Refresh readings for all connected devices.
SyncHistory
Sync history from device (download from BLE and save to store).
SetInterval
Set the measurement interval for a device.
SetBluetoothRange
Set the Bluetooth range for a device.
Fields
SetSmartHome
Set Smart Home integration mode for a device.
Shutdown
Shut down the worker thread.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more