pub trait AuthSchema:
Send
+ Sync
+ 'static {
type User: AuthUser;
type Session: AuthSession;
type Account: AuthAccount;
type Verification: AuthVerification;
// Provided methods
fn openapi_models() -> Vec<OpenApiModel> { ... }
fn user_from_cookie_cache(_user: UserView) -> Option<Self::User> { ... }
}Expand description
App-owned auth schema declaration.
Required Associated Types§
type User: AuthUser
type Session: AuthSession
type Account: AuthAccount
type Verification: AuthVerification
Provided Methods§
Sourcefn openapi_models() -> Vec<OpenApiModel>
fn openapi_models() -> Vec<OpenApiModel>
Wire model projections for this application schema. Add application fields here with their actual input/output policy; database column names do not change canonical accessor-backed wire field names.
Preserve an authenticated cache snapshot only when the application user type is itself a wire snapshot. Never reconstruct a database model from cookie data. Typed physical guards reject cached-only authority otherwise.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".