Type Alias PromiseResult

Source
pub type PromiseResult<TOk, TErr> = Result<PromiseOk<TOk, TErr>, TErr>;
Expand description

Return type for Promise.then, which can be an immediate value to resolve to, another promise to run, or an immediate value to reject.

Similar in usage to futures::Poll.

Aliased Type§

pub enum PromiseResult<TOk, TErr> {
    Ok(PromiseOk<TOk, TErr>),
    Err(TErr),
}

Variants§

§1.0.0

Ok(PromiseOk<TOk, TErr>)

Contains the success value

§1.0.0

Err(TErr)

Contains the error value