#[non_exhaustive]pub struct InitError<I2C: I2c, D = NoDelay> {
pub error: Error<I2C::Error>,
pub i2c: I2C,
pub delay: D,
}Expand description
Initialization failure that returns the I2C bus and delay backend to the caller.
When Tmag5273::init fails, the bus is not consumed.
InitError bundles the Error with the original I2C peripheral and
delay backend so the caller can retry or use them for another device.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.error: Error<I2C::Error>The error that caused initialization to fail.
i2c: I2CThe I2C bus, returned so the caller can reuse it.
delay: DThe delay backend, returned so the caller can reuse it.
Trait Implementations§
Auto Trait Implementations§
impl<I2C, D> Freeze for InitError<I2C, D>
impl<I2C, D> RefUnwindSafe for InitError<I2C, D>
impl<I2C, D> Send for InitError<I2C, D>
impl<I2C, D> Sync for InitError<I2C, D>
impl<I2C, D> Unpin for InitError<I2C, D>
impl<I2C, D> UnsafeUnpin for InitError<I2C, D>
impl<I2C, D> UnwindSafe for InitError<I2C, D>
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