pub enum DriverError<E> {
Bus(E),
Command(&'static str),
}Expand description
What can go wrong driving a part over a bus or a set of pins.
A driver returns this from every transfer sequence. It converts into the core
Error so a driver used as an
Actuator reports the way every other device does: a
bus or pin fault becomes Error::Io, and a command the
part cannot take becomes Error::Codec.
Variants§
Bus(E)
The bus or pin underneath the driver failed: a missing acknowledge, a bus fault, a pin that could not be driven.
Command(&'static str)
The command is outside what the part accepts, such as a channel the part does not have or a frequency its prescaler cannot reach.
Trait Implementations§
Source§impl<E: Clone> Clone for DriverError<E>
impl<E: Clone> Clone for DriverError<E>
Source§fn clone(&self) -> DriverError<E>
fn clone(&self) -> DriverError<E>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<E: Copy> Copy for DriverError<E>
Source§impl<E: Debug> Debug for DriverError<E>
impl<E: Debug> Debug for DriverError<E>
Source§impl<E: Debug> Display for DriverError<E>
impl<E: Debug> Display for DriverError<E>
impl<E: Eq> Eq for DriverError<E>
Source§impl<E: Debug> Error for DriverError<E>
impl<E: Debug> Error for DriverError<E>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl<E: Debug> From<DriverError<E>> for Error
impl<E: Debug> From<DriverError<E>> for Error
Source§fn from(error: DriverError<E>) -> Self
fn from(error: DriverError<E>) -> Self
Converts to this type from the input type.
Source§impl<E: PartialEq> PartialEq for DriverError<E>
impl<E: PartialEq> PartialEq for DriverError<E>
impl<E: PartialEq> StructuralPartialEq for DriverError<E>
Auto Trait Implementations§
impl<E> Freeze for DriverError<E>where
E: Freeze,
impl<E> RefUnwindSafe for DriverError<E>where
E: RefUnwindSafe,
impl<E> Send for DriverError<E>where
E: Send,
impl<E> Sync for DriverError<E>where
E: Sync,
impl<E> Unpin for DriverError<E>where
E: Unpin,
impl<E> UnsafeUnpin for DriverError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for DriverError<E>where
E: 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