Struct embedded_hal_mock::eh0::spi::Transaction
source · pub struct Transaction { /* private fields */ }
Available on crate feature
eh0
only.Expand description
SPI transaction type
Models an SPI write or transfer (with response)
Implementations§
source§impl Transaction
impl Transaction
sourcepub fn write(expected: Vec<u8>) -> Transaction
pub fn write(expected: Vec<u8>) -> Transaction
Create a write transaction
sourcepub fn transfer(expected: Vec<u8>, response: Vec<u8>) -> Transaction
pub fn transfer(expected: Vec<u8>, response: Vec<u8>) -> Transaction
Create a transfer transaction
sourcepub fn send(expected: u8) -> Transaction
pub fn send(expected: u8) -> Transaction
Create a transfer transaction
sourcepub fn read(response: u8) -> Transaction
pub fn read(response: u8) -> Transaction
Create a transfer transaction
Trait Implementations§
source§impl Clone for Transaction
impl Clone for Transaction
source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Transaction
impl Debug for Transaction
source§impl PartialEq for Transaction
impl PartialEq for Transaction
source§fn eq(&self, other: &Transaction) -> bool
fn eq(&self, other: &Transaction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for Transaction
impl StructuralEq for Transaction
impl StructuralPartialEq for Transaction
Auto Trait Implementations§
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
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