Function endpoint

Source
pub fn endpoint<'a, F, Output, FnArgs, Descr>(
    f: F,
) -> Endpoint<'a, Output, Descr>
where F: Injectable<Output, FnArgs> + Send + Sync + 'a, Output: 'static, Descr: HandlerDescription,
Expand description

Constructs a handler that has no further handlers in a chain.

An endpoint is a handler that always breaks handler execution after its completion. So, you can use it when your chain of responsibility must end up, and handle an incoming event.