Struct embassy_executor::raw::AvailableTask
source · pub struct AvailableTask<F: Future + 'static> { /* private fields */ }
Expand description
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>
尝试申请一个 TaskStorage
.
如果任务以及被创建,并且没有运行结束,这个方法会返回 None
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>
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