#[repr(u8)]pub enum ConnectionState {
Offline = 0,
Connecting = 1,
Online = 2,
Sleeping = 3,
Unstable = 4,
Maintenance = 5,
}Available on crate feature
iot only.Expand description
IoT device connection states
Variants§
Offline = 0
Device is offline/disconnected
Connecting = 1
Device is connecting
Online = 2
Device is online and responsive
Sleeping = 3
Device is in sleep/low-power mode
Unstable = 4
Device has connectivity issues
Maintenance = 5
Device is in maintenance mode
Implementations§
Source§impl ConnectionState
impl ConnectionState
Sourcepub fn can_receive_commands(&self) -> bool
pub fn can_receive_commands(&self) -> bool
Returns true if device can receive commands
Sourcepub fn is_healthy(&self) -> bool
pub fn is_healthy(&self) -> bool
Returns true if device is considered healthy
Trait Implementations§
Source§impl Clone for ConnectionState
impl Clone for ConnectionState
Source§fn clone(&self) -> ConnectionState
fn clone(&self) -> ConnectionState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConnectionState
impl Debug for ConnectionState
Source§impl Ord for ConnectionState
impl Ord for ConnectionState
Source§fn cmp(&self, other: &ConnectionState) -> Ordering
fn cmp(&self, other: &ConnectionState) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ConnectionState
impl PartialEq for ConnectionState
Source§impl PartialOrd for ConnectionState
impl PartialOrd for ConnectionState
impl Copy for ConnectionState
impl Eq for ConnectionState
impl StructuralPartialEq for ConnectionState
Auto Trait Implementations§
impl Freeze for ConnectionState
impl RefUnwindSafe for ConnectionState
impl Send for ConnectionState
impl Sync for ConnectionState
impl Unpin for ConnectionState
impl UnwindSafe for ConnectionState
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