Skip to main content

HandlerOutcome

Trait HandlerOutcome 

Source
pub trait HandlerOutcome<T: Serialize, E: Serialize + 'static>: Sealed {
    // Required method
    fn into_output(self) -> Output<T>;
}
Expand description

What Handler::handle may return, tied to the command’s event type: Output<T> is an outcome only for NoEvents, so a command that declares events has Summary<T> and no payload variant to return.

Required Methods§

Source

fn into_output(self) -> Output<T>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Serialize, E: Serialize + 'static> HandlerOutcome<T, E> for Summary<T>

Source§

impl<T: Serialize> HandlerOutcome<T, NoEvents> for Output<T>