pub struct Transaction<W> { /* private fields */ }
Available on crate feature
eh1
only.Expand description
SPI transaction type
Models an SPI write or transfer (with response)
Implementations§
Source§impl<W> Transaction<W>
impl<W> Transaction<W>
Sourcepub fn write_vec(expected: Vec<W>) -> Transaction<W>
pub fn write_vec(expected: Vec<W>) -> Transaction<W>
Create a write transaction
Sourcepub fn transfer(expected: Vec<W>, response: Vec<W>) -> Transaction<W>
pub fn transfer(expected: Vec<W>, response: Vec<W>) -> Transaction<W>
Create a transfer transaction
Sourcepub fn transfer_in_place(expected: Vec<W>, response: Vec<W>) -> Transaction<W>
pub fn transfer_in_place(expected: Vec<W>, response: Vec<W>) -> Transaction<W>
Create a transfer in-place transaction
Sourcepub fn write(expected: W) -> Transaction<W>
pub fn write(expected: W) -> Transaction<W>
Create a write transaction
Sourcepub fn read(response: W) -> Transaction<W>
pub fn read(response: W) -> Transaction<W>
Create a read transaction
Sourcepub fn read_vec(response: Vec<W>) -> Transaction<W>
pub fn read_vec(response: Vec<W>) -> Transaction<W>
Create a read transaction
Sourcepub fn flush() -> Transaction<W>
pub fn flush() -> Transaction<W>
Create flush transaction
Sourcepub fn transaction_start() -> Transaction<W>
pub fn transaction_start() -> Transaction<W>
Create nested transactions
Sourcepub fn transaction_end() -> Transaction<W>
pub fn transaction_end() -> Transaction<W>
Create nested transactions
Sourcepub fn delay(delay: u32) -> Transaction<W>
pub fn delay(delay: u32) -> Transaction<W>
Create a delay transaction
Trait Implementations§
Source§impl<W: Clone> Clone for Transaction<W>
impl<W: Clone> Clone for Transaction<W>
Source§fn clone(&self) -> Transaction<W>
fn clone(&self) -> Transaction<W>
Returns a duplicate 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<W: Debug> Debug for Transaction<W>
impl<W: Debug> Debug for Transaction<W>
Source§impl<W: PartialEq> PartialEq for Transaction<W>
impl<W: PartialEq> PartialEq for Transaction<W>
impl<W: Eq> Eq for Transaction<W>
impl<W> StructuralPartialEq for Transaction<W>
Auto Trait Implementations§
impl<W> Freeze for Transaction<W>
impl<W> RefUnwindSafe for Transaction<W>where
W: RefUnwindSafe,
impl<W> Send for Transaction<W>where
W: Send,
impl<W> Sync for Transaction<W>where
W: Sync,
impl<W> Unpin for Transaction<W>where
W: Unpin,
impl<W> UnwindSafe for Transaction<W>where
W: UnwindSafe,
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