pub struct EmbassyPollable(pub Arc<OnceLock<Vec<u8>>>);Available on crate feature
embassy-runtime only.Expand description
A Pollable backed by an Embassy OnceLock.
This is typically created by the embassy_method_accessor! macro and
becomes ready when the async task resolves.
§Example
extern crate alloc;
use alloc::sync::Arc;
use core::task::Poll;
use embassy_sync::once_lock::OnceLock;
use pk_command::embassy_adapter::EmbassyPollable;
let lock = Arc::new(OnceLock::new());
let pollable = EmbassyPollable(lock);
let _ = pollable; // pass to PK Command state machineTuple Fields§
§0: Arc<OnceLock<Vec<u8>>>Trait Implementations§
Auto Trait Implementations§
impl Freeze for EmbassyPollable
impl !RefUnwindSafe for EmbassyPollable
impl Send for EmbassyPollable
impl Sync for EmbassyPollable
impl Unpin for EmbassyPollable
impl !UnwindSafe for EmbassyPollable
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