[][src]Struct nostd_async::Task

pub struct Task<'t, F: Future<Output = T> + 't, T: 't> { /* fields omitted */ }

An asyncronous task

Implementations

impl<'t, F: Future<Output = T> + 't, T: 't> Task<'t, F, T>[src]

pub fn new(future: F) -> Self[src]

Create a new task from a future

pub fn spawn(&'t mut self, runtime: &'t Runtime) -> JoinHandle<'t, T>[src]

Spawn the task into the given runtime. Note that the task will not be run until a join handle is joined.

Auto Trait Implementations

impl<'t, F, T> !Send for Task<'t, F, T>

impl<'t, F, T> !Sync for Task<'t, F, T>

impl<'t, F, T> Unpin for Task<'t, F, T> where
    F: Unpin,
    T: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.