pub struct Error<I>(/* private fields */);Implementations§
Source§impl<E> Error<E>
impl<E> Error<E>
Sourcepub fn is_timeout(&self) -> bool
pub fn is_timeout(&self) -> bool
Returns true if a read from the sensor timed out.
Sourcepub fn is_io(&self) -> bool
pub fn is_io(&self) -> bool
Returns true if an IO error occurred while reading from or writing to
the sensor’s data pin.
Sourcepub fn is_checksum(&self) -> bool
pub fn is_checksum(&self) -> bool
Returns true if the reading from the sensor had a bad checksum.
Trait Implementations§
impl<I: Eq> Eq for Error<I>
impl<I: PartialEq> StructuralPartialEq for Error<I>
Auto Trait Implementations§
impl<I> Freeze for Error<I>where
ErrorKind<I>: Freeze,
impl<I> RefUnwindSafe for Error<I>where
ErrorKind<I>: RefUnwindSafe,
impl<I> Send for Error<I>where
ErrorKind<I>: Send,
impl<I> Sync for Error<I>where
ErrorKind<I>: Sync,
impl<I> Unpin for Error<I>where
ErrorKind<I>: Unpin,
impl<I> UnsafeUnpin for Error<I>where
ErrorKind<I>: UnsafeUnpin,
impl<I> UnwindSafe for Error<I>where
ErrorKind<I>: UnwindSafe,
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