Skip to main content

ActionResult

Type Alias ActionResult 

Source
pub type ActionResult<T = ()> = Result<T, Error>;
Expand description

The result of a request handler — the framework-level counterpart of ASP.NET Core’s ActionResult<T>.

Same underlying type as Result; the name is the handler-facing one: IRequestHandler::handle, IPipelineBehavior::handle and Next::run return it, so action code reads like the ASP.NET Core action it corresponds to. T defaults to () for an action without a body.

Aliased Type§

pub enum ActionResult<T = ()> {
    Ok(T),
    Err(Error),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Error)

Contains the error value