Struct embassy_executor::raw::AvailableTask
source · pub struct AvailableTask<F: Future + 'static> { /* private fields */ }
Expand description
An uninitialized TaskStorage
.
Implementations§
source§impl<F: Future + 'static> AvailableTask<F>
impl<F: Future + 'static> AvailableTask<F>
sourcepub fn claim(task: &'static TaskStorage<F>) -> Option<Self>
pub fn claim(task: &'static TaskStorage<F>) -> Option<Self>
Try to claim a TaskStorage
.
This function returns None
if a task has already been spawned and has not finished running.
sourcepub fn initialize(self, future: impl FnOnce() -> F) -> SpawnToken<F>
pub fn initialize(self, future: impl FnOnce() -> F) -> SpawnToken<F>
Initialize the TaskStorage
to run the given future.
Auto Trait Implementations§
impl<F> !RefUnwindSafe for AvailableTask<F>
impl<F> Send for AvailableTask<F>
impl<F> Sync for AvailableTask<F>
impl<F> Unpin for AvailableTask<F>
impl<F> !UnwindSafe for AvailableTask<F>
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