pub struct MemoryCsrfTokenStore { /* private fields */ }Expand description
In-memory CSRF token store.
Implementations§
Trait Implementations§
Source§impl Clone for MemoryCsrfTokenStore
impl Clone for MemoryCsrfTokenStore
Source§fn clone(&self) -> MemoryCsrfTokenStore
fn clone(&self) -> MemoryCsrfTokenStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CsrfTokenStore for MemoryCsrfTokenStore
impl CsrfTokenStore for MemoryCsrfTokenStore
Source§fn issue<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn issue<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Issues a token bound to the given session id with the configured TTL.
Source§fn validate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
candidate: &'life2 str,
single_use: bool,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn validate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
candidate: &'life2 str,
single_use: bool,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Validates a candidate token against the session id, consuming it on
success when
single_use is true.Source§impl Default for MemoryCsrfTokenStore
impl Default for MemoryCsrfTokenStore
Source§fn default() -> MemoryCsrfTokenStore
fn default() -> MemoryCsrfTokenStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MemoryCsrfTokenStore
impl RefUnwindSafe for MemoryCsrfTokenStore
impl Send for MemoryCsrfTokenStore
impl Sync for MemoryCsrfTokenStore
impl Unpin for MemoryCsrfTokenStore
impl UnsafeUnpin for MemoryCsrfTokenStore
impl UnwindSafe for MemoryCsrfTokenStore
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