Function map_request_with_state
fn map_request_with_state<F, S, T>(state: S, f: F) -> MapRequestLayer<F, S, T>
Create a middleware from an async function that transforms a request, with the given state.
See State for more details about accessing state.
Example
use ;
async
let state = AppState ;
let app = new
.route
.route_layer
.with_state;
# let _: Router = app;