Type Alias celery::task::TaskResult

source ·
pub type TaskResult<R> = Result<R, TaskError>;
Expand description

The return type for a task.

Aliased Type§

enum TaskResult<R> {
    Ok(R),
    Err(TaskError),
}

Variants§

§1.0.0

Ok(R)

Contains the success value

§1.0.0

Err(TaskError)

Contains the error value

Trait Implementations§

source§

impl<'de, T, E> Deserialize<'de> for Result<T, E>where T: Deserialize<'de>, E: Deserialize<'de>,

source§

fn deserialize<D>( deserializer: D ) -> Result<Result<T, E>, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<T, E> Serialize for Result<T, E>where T: Serialize, E: Serialize,

source§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T, E, F, C> TaskResultExt<T, E, F, C> for Result<T, E>where E: Error, F: FnOnce() -> C, C: Display + Send + Sync + 'static,

source§

fn with_expected_err(self, f: F) -> Result<T, TaskError>

Convert the error type to a TaskError::ExpectedError.
source§

fn with_unexpected_err(self, f: F) -> Result<T, TaskError>

Convert the error type to a TaskError::UnexpectedError.