pub enum HardwareError {
IncompatiblePin {
pin: u8,
mode: PinModeId,
context: &'static str,
},
UnknownPin {
pin: PinIdOrName,
},
}
Variants§
IncompatiblePin
Pin ({pin}) not compatible with mode ({mode}) - {context}
UnknownPin
Unknown pin {pin}
Fields
§
pin: PinIdOrName
Trait Implementations§
Source§impl Debug for HardwareError
impl Debug for HardwareError
Source§impl Display for HardwareError
impl Display for HardwareError
Source§impl Error for HardwareError
impl Error for HardwareError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl ErrorCompat for HardwareError
impl ErrorCompat for HardwareError
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source
. Read moreSource§impl From<HardwareError> for Error
impl From<HardwareError> for Error
Source§fn from(value: HardwareError) -> Self
fn from(value: HardwareError) -> Self
Converts to this type from the input type.
Source§impl<__T0, __T1, __T2> IntoError<HardwareError> for IncompatiblePinSnafu<__T0, __T1, __T2>where
HardwareError: Error + ErrorCompat,
__T0: Into<u8>,
__T1: Into<PinModeId>,
__T2: Into<&'static str>,
impl<__T0, __T1, __T2> IntoError<HardwareError> for IncompatiblePinSnafu<__T0, __T1, __T2>where
HardwareError: Error + ErrorCompat,
__T0: Into<u8>,
__T1: Into<PinModeId>,
__T2: Into<&'static str>,
Source§fn into_error(self, error: Self::Source) -> HardwareError
fn into_error(self, error: Self::Source) -> HardwareError
Combine the information to produce the error
Source§impl<__T0> IntoError<HardwareError> for UnknownPinSnafu<__T0>
impl<__T0> IntoError<HardwareError> for UnknownPinSnafu<__T0>
Source§fn into_error(self, error: Self::Source) -> HardwareError
fn into_error(self, error: Self::Source) -> HardwareError
Combine the information to produce the error
Auto Trait Implementations§
impl Freeze for HardwareError
impl RefUnwindSafe for HardwareError
impl Send for HardwareError
impl Sync for HardwareError
impl Unpin for HardwareError
impl UnwindSafe for HardwareError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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