Struct radio::mock::Transaction
source · pub struct Transaction<St, Reg, Ch, Inf, Irq, E> { /* private fields */ }
Expand description
Transactions describe interactions with a radio device
Implementations§
source§impl<St, Reg, Ch, Inf, Irq, E> Transaction<St, Reg, Ch, Inf, Irq, E>
impl<St, Reg, Ch, Inf, Irq, E> Transaction<St, Reg, Ch, Inf, Irq, E>
sourcepub fn set_register(reg: Reg, value: u8, err: Option<E>) -> Self
pub fn set_register(reg: Reg, value: u8, err: Option<E>) -> Self
Set a radio register
sourcepub fn get_register(res: Result<u8, E>) -> Self
pub fn get_register(res: Result<u8, E>) -> Self
Get a radio register
sourcepub fn set_channel(ch: Ch, err: Option<E>) -> Self
pub fn set_channel(ch: Ch, err: Option<E>) -> Self
Set a radio channel
sourcepub fn start_transmit(data: Vec<u8>, err: Option<E>) -> Self
pub fn start_transmit(data: Vec<u8>, err: Option<E>) -> Self
Start radio transmission
sourcepub fn check_transmit(res: Result<bool, E>) -> Self
pub fn check_transmit(res: Result<bool, E>) -> Self
Check for transmission completed
sourcepub fn start_receive(err: Option<E>) -> Self
pub fn start_receive(err: Option<E>) -> Self
Start radio reception
sourcepub fn check_receive(restart: bool, res: Result<bool, E>) -> Self
pub fn check_receive(restart: bool, res: Result<bool, E>) -> Self
Check for radio reception
sourcepub fn get_received(res: Result<(Vec<u8>, Inf), E>) -> Self
pub fn get_received(res: Result<(Vec<u8>, Inf), E>) -> Self
Fetch received data and information
Trait Implementations§
source§impl<St: Clone, Reg: Clone, Ch: Clone, Inf: Clone, Irq: Clone, E: Clone> Clone for Transaction<St, Reg, Ch, Inf, Irq, E>
impl<St: Clone, Reg: Clone, Ch: Clone, Inf: Clone, Irq: Clone, E: Clone> Clone for Transaction<St, Reg, Ch, Inf, Irq, E>
source§fn clone(&self) -> Transaction<St, Reg, Ch, Inf, Irq, E>
fn clone(&self) -> Transaction<St, Reg, Ch, Inf, Irq, E>
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<St: Debug, Reg: Debug, Ch: Debug, Inf: Debug, Irq: Debug, E: Debug> Debug for Transaction<St, Reg, Ch, Inf, Irq, E>
impl<St: Debug, Reg: Debug, Ch: Debug, Inf: Debug, Irq: Debug, E: Debug> Debug for Transaction<St, Reg, Ch, Inf, Irq, E>
source§impl<St: PartialEq, Reg: PartialEq, Ch: PartialEq, Inf: PartialEq, Irq: PartialEq, E: PartialEq> PartialEq for Transaction<St, Reg, Ch, Inf, Irq, E>
impl<St: PartialEq, Reg: PartialEq, Ch: PartialEq, Inf: PartialEq, Irq: PartialEq, E: PartialEq> PartialEq for Transaction<St, Reg, Ch, Inf, Irq, E>
source§fn eq(&self, other: &Transaction<St, Reg, Ch, Inf, Irq, E>) -> bool
fn eq(&self, other: &Transaction<St, Reg, Ch, Inf, Irq, E>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<St, Reg, Ch, Inf, Irq, E> StructuralPartialEq for Transaction<St, Reg, Ch, Inf, Irq, E>
Auto Trait Implementations§
impl<St, Reg, Ch, Inf, Irq, E> Freeze for Transaction<St, Reg, Ch, Inf, Irq, E>
impl<St, Reg, Ch, Inf, Irq, E> RefUnwindSafe for Transaction<St, Reg, Ch, Inf, Irq, E>where
St: RefUnwindSafe,
Reg: RefUnwindSafe,
Ch: RefUnwindSafe,
Irq: RefUnwindSafe,
Inf: RefUnwindSafe,
E: RefUnwindSafe,
impl<St, Reg, Ch, Inf, Irq, E> Send for Transaction<St, Reg, Ch, Inf, Irq, E>
impl<St, Reg, Ch, Inf, Irq, E> Sync for Transaction<St, Reg, Ch, Inf, Irq, E>
impl<St, Reg, Ch, Inf, Irq, E> Unpin for Transaction<St, Reg, Ch, Inf, Irq, E>
impl<St, Reg, Ch, Inf, Irq, E> UnwindSafe for Transaction<St, Reg, Ch, Inf, Irq, E>where
St: UnwindSafe,
Reg: UnwindSafe,
Ch: UnwindSafe,
Irq: UnwindSafe,
Inf: UnwindSafe,
E: 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