You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have looked for existing issues (including closed) about this
Bug Report
Version
v0.8.1
Platform
UNIX
Crates
axum
axum-extra
Description
Now that the Host extractor was moved to the axum-extra crate and with the new changes to how Option extractors work, it's not possible to do something like this anymore:
use axum_extra::extract::Host;asyncfnhandler(host:Option<Host>){}
as the compiler complains with this error:
the trait bound `axum_extra::extract::Host: OptionalFromRequestParts<Arc<AppState>>` is not satisfied
you can use `cargo tree` to explore your dependency tree
required for `std::option::Option<axum_extra::extract::Host>` to implement `FromRequestParts<Arc<AppState>>`