Can some rustlang fluent creature help me with an axum problem?
I want to write some middleware that reads a cookie, a header does some value choosing that it needs some configuration for and attached the result to the request.
Currently this is implemented using an axum middleware function with state that is passed through axum::middleware::from_fn_with_state to turn it into a layer, but I want to turn it into a Layer struct, but I keep running into type problems.
async fn middleware(
State(arc_state): State<Arc<LanguageManifest>>,
cookie_header: Option<TypedHeader<headers::Cookie>>,
mut req: Request<Body>,
next: Next,
) -> Response {
[…]
}

