pub enum Message<'a> {
Read {
address: u16,
data: &'a mut [u8],
flags: ReadFlags,
},
Write {
address: u16,
data: &'a [u8],
flags: WriteFlags,
},
}
Expand description
Part of a combined I2C transaction.
Variants
Read
Fields
address: u16
The slave address of the device to read from.
data: &'a mut [u8]
A data buffer to read into.
flags: ReadFlags
Additional flags can modify the operation to work around device quirks.
I2C read command
Write
Fields
address: u16
The slave address of the device to write to.
data: &'a [u8]
The data to write.
flags: WriteFlags
Additional flags can modify the operation to work around device quirks.
I2C write command
Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Message<'a>
impl<'a> Send for Message<'a>
impl<'a> Sync for Message<'a>
impl<'a> Unpin for Message<'a>
impl<'a> !UnwindSafe for Message<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more