pub enum Command {
Show 16 variants
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,
},
RefreshServiceStatus,
StartServiceCollector,
StopServiceCollector,
SetAlias {
device_id: String,
alias: Option<String>,
},
ForgetDevice {
device_id: String,
},
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.
RefreshServiceStatus
Refresh the aranet-service status.
StartServiceCollector
Start the aranet-service collector.
StopServiceCollector
Stop the aranet-service collector.
SetAlias
Set a friendly alias/name for a device.
Fields
ForgetDevice
Forget (remove) a device from the known devices list and store.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more