pub struct Task<D> { /* private fields */ }Implementations§
Source§impl<D> Task<D>
impl<D> Task<D>
Sourcepub fn from_async<F, Fut>(task: F) -> Self
pub fn from_async<F, Fut>(task: F) -> Self
Create an async task from the full TaskContext.
Sourcepub fn from_sync<F>(task: F) -> Self
pub fn from_sync<F>(task: F) -> Self
Create a lightweight synchronous task from the full TaskContext.
Sourcepub fn from_blocking<F>(task: F) -> Self
pub fn from_blocking<F>(task: F) -> Self
Create a blocking synchronous task from the full TaskContext.
Trait Implementations§
Auto Trait Implementations§
impl<D> Freeze for Task<D>
impl<D> !RefUnwindSafe for Task<D>
impl<D> Send for Task<D>
impl<D> Sync for Task<D>
impl<D> Unpin for Task<D>
impl<D> UnsafeUnpin for Task<D>
impl<D> !UnwindSafe for Task<D>
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