pub struct DeviceStatus { /* private fields */ }Expand description
Device Status
This struct describes the status of the device. The variables that indicate if a warning or error has occured. This status is updated whenever the counters are read, as errors and warnings are sent along.
Note: You are responsible for reading these warnings. Alternatively, you can also query the
connected pins NWARN and NERR.
Implementations§
Source§impl DeviceStatus
impl DeviceStatus
Sourcepub fn is_ok(&self) -> bool
pub fn is_ok(&self) -> bool
Return true if the device has no errors or warnings, false otherwise.
Sourcepub fn get_warning(&self) -> WarningStatus
pub fn get_warning(&self) -> WarningStatus
Get the current warning status.
Sourcepub fn get_error(&self) -> ErrorStatus
pub fn get_error(&self) -> ErrorStatus
Get the current error status.
Trait Implementations§
Source§impl Clone for DeviceStatus
impl Clone for DeviceStatus
Source§fn clone(&self) -> DeviceStatus
fn clone(&self) -> DeviceStatus
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 DeviceStatus
impl Debug for DeviceStatus
Source§impl Default for DeviceStatus
impl Default for DeviceStatus
Source§fn default() -> DeviceStatus
fn default() -> DeviceStatus
Returns the “default value” for a type. Read more
Source§impl PartialEq for DeviceStatus
impl PartialEq for DeviceStatus
impl Copy for DeviceStatus
impl Eq for DeviceStatus
impl StructuralPartialEq for DeviceStatus
Auto Trait Implementations§
impl Freeze for DeviceStatus
impl RefUnwindSafe for DeviceStatus
impl Send for DeviceStatus
impl Sync for DeviceStatus
impl Unpin for DeviceStatus
impl UnwindSafe for DeviceStatus
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