pub enum Caller<T> {
Standard(Pin<Box<dyn Future<Output = T> + Send + 'static>>),
Progressing(Box<dyn FnOnce(TaskProgressShared) -> Pin<Box<dyn Future<Output = T> + Send + 'static>>>),
}Expand description
The task’s body itself.
It has two states.
Standardhas no progress.Progressinghas a progress and providesTaskProgressShared.
Variants§
Standard(Pin<Box<dyn Future<Output = T> + Send + 'static>>)
Standard caller. No progress just a future.
Progressing(Box<dyn FnOnce(TaskProgressShared) -> Pin<Box<dyn Future<Output = T> + Send + 'static>>>)
Progressing caller. Has progress. Holds a closure that returns a future.
Implementations§
Auto Trait Implementations§
impl<T> Freeze for Caller<T>
impl<T> !RefUnwindSafe for Caller<T>
impl<T> !Send for Caller<T>
impl<T> !Sync for Caller<T>
impl<T> Unpin for Caller<T>
impl<T> !UnwindSafe for Caller<T>
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