#[non_exhaustive]pub enum ErrorKind {
Bus,
InvalidDateTime,
InvalidAlarmConfig,
UnsupportedSqwFrequency,
InvalidAddress,
NvramOutOfBounds,
NvramWriteProtected,
Other,
}Expand description
Common categories of errors for RTC drivers
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Bus
Underlying bus error (I2C, SPI, etc.)
InvalidDateTime
Invalid date/time value provided
InvalidAlarmConfig
Invalid alarm configuration
UnsupportedSqwFrequency
The specified square wave frequency is not supported by the RTC
InvalidAddress
Invalid register address
NvramOutOfBounds
NVRAM address out of bounds
NvramWriteProtected
NVRAM is write protected
Other
Any other error not covered above
Trait Implementations§
Source§impl Error for ErrorKind
Allows ErrorKind to be used directly as an error type.
impl Error for ErrorKind
Allows ErrorKind to be used directly as an error type.
Simple drivers can use type Error = ErrorKind instead of defining custom errors.
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
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