[][src]Struct af_lib::prelude::af_core::task::Task

#[must_use = "Tasks are killed when dropped."]pub struct Task<T> { /* fields omitted */ }

An asynchronous task.

Implementations

impl<T> Task<T>[src]

pub async fn kill(self)[src]

Kills the task and waits for its future to be dropped.

pub async fn join(self) -> Result<T, Panic>[src]

Waits for the task to stop and returns its result.

impl<T, E> Task<Result<T, E>> where
    E: From<Panic>, 
[src]

pub async fn try_join(self) -> Result<T, E>[src]

Waits for the fallible task to stop and returns its result.

Trait Implementations

impl<T> Start<T> for Task<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Task<T>[src]

impl<T> Send for Task<T> where
    T: Send
[src]

impl<T> Sync for Task<T>[src]

impl<T> Unpin for Task<T>[src]

impl<T> UnwindSafe for Task<T>[src]

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> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,