Trait salvo_csrf::CsrfStore

source ·
pub trait CsrfStore: Send + Sync + 'static {
    type Error: StdError + Send + Sync + 'static;

    fn load_secret<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        req: &'life1 mut Request,
        depot: &'life2 mut Depot
    ) -> Pin<Box<dyn Future<Output = Option<Vec<u8>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait
; fn save_secret<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        req: &'life1 mut Request,
        depot: &'life2 mut Depot,
        res: &'life3 mut Response,
        secret: &'life4 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        'life4: 'async_trait
; }
Expand description

Store secret.

Required Associated Types§

Error type for CsrfStore.

Required Methods§

Get the secret from the store.

Save the secret from the store.

Implementors§