pub struct Status(/* private fields */);
Expand description
Wrapper for the status value returned from the device. Provides convenience methods and debug implemantions.
Implementations§
Source§impl Status
impl Status
Sourcepub fn data_ready(&self) -> bool
pub fn data_ready(&self) -> bool
Indicates if there is data ready to be read.
Sourcepub fn reached_max_retries(&self) -> bool
pub fn reached_max_retries(&self) -> bool
Indicates whether the max retries has been reached. Can only be true if auto acknowledgement is enabled.
Sourcepub fn data_pipe_available(&self) -> Option<DataPipe>
pub fn data_pipe_available(&self) -> Option<DataPipe>
Returns data pipe number for the payload availbe for reading or None if RX FIFO is empty.
Trait Implementations§
impl Copy for Status
impl Eq for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnwindSafe for Status
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