Skip to main content

TaskResult

Type Alias TaskResult 

Source
pub type TaskResult<T = ()> = Result<T, Box<dyn Error + Send + Sync + 'static>>;
Expand description

The result returned by application-defined task operations.

Errors must be thread-safe and own every value they reference so a runtime may move them across worker boundaries and retain their source chains.

Aliased Type§

pub enum TaskResult<T = ()> {
    Ok(T),
    Err(Box<dyn Error + Send + Sync>),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Box<dyn Error + Send + Sync>)

Contains the error value