Function filter_map

Source
pub fn filter_map<'a, Projection, Output, NewType, Args, Descr>(
    proj: Projection,
) -> Handler<'a, Output, Descr>
where Asyncify<Projection>: Injectable<Option<NewType>, Args> + Send + Sync + 'a, Output: 'a, Descr: HandlerDescription, NewType: Send + Sync + 'static,
Expand description

Constructs a handler that optionally passes a value of a new type further.

If the proj function returns Some(v) then v will be added to the container and passed further in a handler chain. If the function returns None, then the handler will return ControlFlow::Continue with the old container.