pub struct CookieTokenStore { /* private fields */ }Available on crate feature
cookie only.Expand description
A TokenStore carrying the token in a hardened cookie: __Host-
prefixed, Secure, HttpOnly, SameSite=Lax, and scoped to /.
Requires the cookie layer (RouterBuilder::cookies) to be registered
on the router.
Implementations§
Trait Implementations§
Source§impl Default for CookieTokenStore
impl Default for CookieTokenStore
Source§impl TokenStore for CookieTokenStore
impl TokenStore for CookieTokenStore
Source§fn read<'a>(&'a self, cx: &'a Cx) -> TokenStoreFuture<'a, Option<Token>>
fn read<'a>(&'a self, cx: &'a Cx) -> TokenStoreFuture<'a, Option<Token>>
Reads the token presented by the current request, or
None when the
request carries none (or a malformed one).Auto Trait Implementations§
impl Freeze for CookieTokenStore
impl RefUnwindSafe for CookieTokenStore
impl Send for CookieTokenStore
impl Sync for CookieTokenStore
impl Unpin for CookieTokenStore
impl UnsafeUnpin for CookieTokenStore
impl UnwindSafe for CookieTokenStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more