pub enum Operation<'a> {
Write(&'a [u8]),
Read(&'a mut [u8]),
}Expand description
A single operation in a multi-stage I2C transaction.
Used with I2c::transfer to compose general scatter/gather transfers. A RESTART is
inserted automatically between adjacent operations of differing direction; the underlying
i2c_transfer always emits a STOP after the final operation.
Variants§
Write(&'a [u8])
Write the bytes from the buffer to the bus.
Read(&'a mut [u8])
Read bytes from the bus into the buffer.
Auto Trait Implementations§
impl<'a> Freeze for Operation<'a>
impl<'a> RefUnwindSafe for Operation<'a>
impl<'a> Send for Operation<'a>
impl<'a> Sync for Operation<'a>
impl<'a> Unpin for Operation<'a>
impl<'a> !UnwindSafe for Operation<'a>
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