Skip to main content

HandlerResult

Type Alias HandlerResult 

Source
pub type HandlerResult<T> = Result<Output<T>, Error>;
Expand description

The result type for command handlers.

Enables use of the ? operator for error propagation.

Aliased Type§

pub enum HandlerResult<T> {
    Ok(Output<T>),
    Err(Error),
}

Variants§

§1.0.0

Ok(Output<T>)

Contains the success value

§1.0.0

Err(Error)

Contains the error value

Trait Implementations§

Source§

impl<T: Serialize> IntoHandlerResult<T> for HandlerResult<T>

Implementation for HandlerResult<T> - passes through unchanged.

This is the explicit path: handlers that need Output::Silent or Output::Binary can return HandlerResult<T> directly.

Source§

fn into_handler_result(self) -> HandlerResult<T>

Convert this type into a HandlerResult<T>.