pub trait AsyncDevice: Device {
type Err;
// Required methods
async fn delay_us_async(&mut self, us: u32);
async fn flush_async(&mut self) -> Result<(), Self::Err>;
// Provided methods
async fn write_nibble_async(
&mut self,
mode: RegisterSelectMode,
data: u8,
) -> Result<(), Self::Err> { ... }
async fn write_byte_async(
&mut self,
mode: RegisterSelectMode,
byte: u8,
) -> Result<(), Self::Err> { ... }
}Available on crate feature
async only.Required Associated Types§
Required Methods§
async fn delay_us_async(&mut self, us: u32)
async fn flush_async(&mut self) -> Result<(), Self::Err>
Provided Methods§
async fn write_nibble_async( &mut self, mode: RegisterSelectMode, data: u8, ) -> Result<(), Self::Err>
async fn write_byte_async( &mut self, mode: RegisterSelectMode, byte: u8, ) -> Result<(), Self::Err>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl<I, D, P> AsyncDevice for I2cExpanderDevice<I, D, P>
Available on crate feature i2c-expander-device-async and (crate features i2c-expander-device or i2c-expander-device-async) only.
impl<I, D, P> AsyncDevice for I2cExpanderDevice<I, D, P>
Available on crate feature
i2c-expander-device-async and (crate features i2c-expander-device or i2c-expander-device-async) only.