pub enum Error<I2cError>where
I2cError: Debug,{
I2c(I2cError),
InvalidAddress,
UnsupportedSqwFrequency,
DateTime(DateTimeError),
InvalidBaseCentury,
}Expand description
DS3231 driver errors
Variants§
I2c(I2cError)
I2C communication error
InvalidAddress
Invalid register address
UnsupportedSqwFrequency
The specified square wave frequency is not supported by the RTC
DateTime(DateTimeError)
Invalid date/time parameters provided by user
InvalidBaseCentury
Invalid Base Century (It should be either 19,20,21)
Trait Implementations§
Source§impl<I2cError> Error for Error<I2cError>
impl<I2cError> Error for Error<I2cError>
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()
impl<I2cError> Copy for Error<I2cError>
impl<I2cError> Eq for Error<I2cError>
impl<I2cError> StructuralPartialEq for Error<I2cError>where
I2cError: Debug,
Auto Trait Implementations§
impl<I2cError> Freeze for Error<I2cError>where
I2cError: Freeze,
impl<I2cError> RefUnwindSafe for Error<I2cError>where
I2cError: RefUnwindSafe,
impl<I2cError> Send for Error<I2cError>where
I2cError: Send,
impl<I2cError> Sync for Error<I2cError>where
I2cError: Sync,
impl<I2cError> Unpin for Error<I2cError>where
I2cError: Unpin,
impl<I2cError> UnwindSafe for Error<I2cError>where
I2cError: 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