pub struct Runner<'a, TRX> { /* private fields */ }Expand description
Long-running task that owns the radio. Spawn it once; call its
Runner::run method, which never returns.
Implementations§
Source§impl<'a, TRX: Transceiver> Runner<'a, TRX>
impl<'a, TRX: Transceiver> Runner<'a, TRX>
Sourcepub async fn run(&mut self) -> !
pub async fn run(&mut self) -> !
Run forever. Intended to be spawned as an #[embassy_executor::task].
The body is select(tx_request_recv, trx.recv()) – whichever fires
first wins, and the loser’s future is dropped. That’s safe by
construction: trx.recv() hasn’t started any SPI work while sitting
in RX, and tx_request.receive() is a passive channel poll. The
radio is never left in a half-configured state.
Auto Trait Implementations§
impl<'a, TRX> !RefUnwindSafe for Runner<'a, TRX>
impl<'a, TRX> !Send for Runner<'a, TRX>
impl<'a, TRX> !Sync for Runner<'a, TRX>
impl<'a, TRX> !UnwindSafe for Runner<'a, TRX>
impl<'a, TRX> Freeze for Runner<'a, TRX>where
TRX: Freeze,
impl<'a, TRX> Unpin for Runner<'a, TRX>where
TRX: Unpin,
impl<'a, TRX> UnsafeUnpin for Runner<'a, TRX>where
TRX: UnsafeUnpin,
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