pub fn map_state<H, S1, S2, E, F>(
f: F,
handler: H,
) -> impl Handler<S1, E, Output = H::Output>
Expand description
Maps the state passed to the constructed handler and forwards the mapped state to its composed handler.
This function constructs a handler that maps the state it receives and passes the resulting state to its composed handler. The mapping function can produce arbitrary state for the composed handler.