pub type Result<T, E> = core::result::Result<T, Error<E>>;
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Error<E> {
I2c(E),
InvalidCode(u8),
InvalidIout,
InvalidRfs,
UnknownRfs,
}
#[cfg(feature = "core-error")]
impl<E: core::fmt::Debug> core::error::Error for Error<E> {}
#[cfg(feature = "core-error")]
impl<E: core::fmt::Debug> core::fmt::Display for Error<E> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{self:?}")
}
}