pub trait FlashStore:
Debug
+ Send
+ Sync
+ 'static {
// Required methods
fn load_flash(
&self,
req: &mut Request,
depot: &mut Depot,
) -> impl Future<Output = Option<Flash>> + Send;
fn save_flash(
&self,
req: &mut Request,
depot: &mut Depot,
res: &mut Response,
flash: Flash,
) -> impl Future<Output = ()> + Send;
fn clear_flash(
&self,
depot: &mut Depot,
res: &mut Response,
) -> impl Future<Output = ()> + Send;
}Expand description
FlashStore is for stores flash messages.
Required Methods§
Sourcefn load_flash(
&self,
req: &mut Request,
depot: &mut Depot,
) -> impl Future<Output = Option<Flash>> + Send
fn load_flash( &self, req: &mut Request, depot: &mut Depot, ) -> impl Future<Output = Option<Flash>> + Send
Get the flash messages from the store.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl FlashStore for CookieStore
Available on crate feature
cookie-store only.impl FlashStore for SessionStore
Available on crate feature
session-store only.