pub struct AppState {
pub services: ServiceRegistry,
pub server_config: ServerConfig,
pub cookie_key: Key,
}Expand description
Shared application state passed to every handler via axum’s state system.
Holds the service registry, resolved server config, and the cookie signing key.
Handlers extract individual services using the Service<T> extractor.
Fields§
§services: ServiceRegistry§server_config: ServerConfigTrait Implementations§
Source§impl<T> FromRequest<AppState> for FormReq<T>where
T: DeserializeOwned + 'static,
impl<T> FromRequest<AppState> for FormReq<T>where
T: DeserializeOwned + 'static,
Source§impl<T> FromRequest<AppState> for JsonReq<T>where
T: DeserializeOwned + 'static,
impl<T> FromRequest<AppState> for JsonReq<T>where
T: DeserializeOwned + 'static,
Source§impl FromRequestParts<AppState> for ClientIp
impl FromRequestParts<AppState> for ClientIp
Source§impl FromRequestParts<AppState> for RateLimitInfo
impl FromRequestParts<AppState> for RateLimitInfo
Source§impl FromRequestParts<AppState> for RequestId
impl FromRequestParts<AppState> for RequestId
Auto Trait Implementations§
impl Freeze for AppState
impl !RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
impl !UnwindSafe for AppState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more