orpc/context.rs
1/// Context is any user-defined type that is `Send + Sync + 'static`.
2///
3/// There is NO framework-level Context struct — users define their own.
4/// Middleware transforms one context type into another at compile time:
5///
6/// ```ignore
7/// struct AppCtx { db: DbPool, headers: HeaderMap }
8/// struct AuthCtx { db: DbPool, user: User }
9/// // auth middleware: AppCtx → AuthCtx
10/// ```
11pub trait Context: Send + Sync + 'static {}
12
13// Blanket impl: any Send + Sync + 'static type is a valid Context.
14impl<T: Send + Sync + 'static> Context for T {}