Trait salvo_flash::FlashStore
source · pub trait FlashStore: Debug + Send + Sync + 'static {
fn load_flash<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 mut Request,
depot: &'life2 mut Depot
) -> Pin<Box<dyn Future<Output = Option<Flash>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn save_flash<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
req: &'life1 mut Request,
depot: &'life2 mut Depot,
res: &'life3 mut Response,
flash: Flash
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
fn clear_flash<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
depot: &'life1 mut Depot,
res: &'life2 mut Response
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
}
Expand description
FlashStore
is for stores flash messages.
Required Methods§
sourcefn load_flash<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 mut Request,
depot: &'life2 mut Depot
) -> Pin<Box<dyn Future<Output = Option<Flash>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn load_flash<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 mut Request,
depot: &'life2 mut Depot
) -> Pin<Box<dyn Future<Output = Option<Flash>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Get the flash messages from the store.
sourcefn save_flash<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
req: &'life1 mut Request,
depot: &'life2 mut Depot,
res: &'life3 mut Response,
flash: Flash
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn save_flash<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
req: &'life1 mut Request,
depot: &'life2 mut Depot,
res: &'life3 mut Response,
flash: Flash
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Save the flash messages to the store.
Implementors§
impl FlashStore for CookieStore
Available on crate feature
cookie-store
only.impl FlashStore for SessionStore
Available on crate feature
session-store
only.