Struct embedded_hal_mock::spi::Transaction
source · pub struct Transaction { /* private fields */ }
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 more