pub trait Identity:
Send
+ Sync
+ 'static {
// Required method
fn is_guest(&self) -> bool;
// Provided method
fn csrf_binding(&self) -> Option<&[u8]> { ... }
}Expand description
Who is asking. A request that reaches a handler always carries one, possibly a guest.
Required Methods§
Provided Methods§
Sourcefn csrf_binding(&self) -> Option<&[u8]>
fn csrf_binding(&self) -> Option<&[u8]>
The value CSRF tokens are bound to: the session id, or a pre-session
id for a guest. None means no binding exists, and an unsafe method
on a CSRF-protected route is refused.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".