pub trait AccountSession {
type Account: AccountAuthorizer;
// Required method
fn authorize(
&self,
required_role: <Self::Account as AccountAuthorizer>::Role,
) -> Result<&Self::Account, <Self::Account as AccountAuthorizer>::Error>;
}Expand description
Session capability used by protected handlers.
Required Associated Types§
Sourcetype Account: AccountAuthorizer
type Account: AccountAuthorizer
Account loaded by the session.
Required Methods§
Returns the current account after applying its authorization policy.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".