pub enum Operation<'a> {
Read(&'a mut [u8]),
Write(&'a [u8]),
}
Expand description
I2C operation.
Several operations can be combined as part of a transaction.
Variants§
Read(&'a mut [u8])
Read data into the provided buffer.
Write(&'a [u8])
Write data from the provided buffer.
Trait Implementations§
impl<'a> Eq for Operation<'a>
impl<'a> StructuralPartialEq for Operation<'a>
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 12 bytes
Size for each variant:
Read
: 8 bytesWrite
: 8 bytes