pub trait Context:
Send
+ Sync
+ 'static { }Expand description
Context is any user-defined type that is Send + Sync + 'static.
There is NO framework-level Context struct — users define their own. Middleware transforms one context type into another at compile time:
ⓘ
struct AppCtx { db: DbPool, headers: HeaderMap }
struct AuthCtx { db: DbPool, user: User }
// auth middleware: AppCtx → AuthCtx