#[non_exhaustive]pub struct SessionStore {
pub name: String,
}Available on crate feature
session-store only.Expand description
SessionStore is a FlashStore implementation that stores the flash messages in a session.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe session key for the flash messages.
Implementations§
Source§impl SessionStore
impl SessionStore
Sourcepub fn into_handler(self) -> FlashHandler<Self>
pub fn into_handler(self) -> FlashHandler<Self>
Converts into FlashHandler.
Trait Implementations§
Source§impl Debug for SessionStore
impl Debug for SessionStore
Source§impl Default for SessionStore
impl Default for SessionStore
Source§impl FlashStore for SessionStore
impl FlashStore for SessionStore
Source§async fn load_flash(
&self,
_req: &mut Request,
depot: &mut Depot,
) -> Option<Flash>
async fn load_flash( &self, _req: &mut Request, depot: &mut Depot, ) -> Option<Flash>
Get the flash messages from the store.
Source§async fn save_flash(
&self,
_req: &mut Request,
depot: &mut Depot,
_res: &mut Response,
flash: Flash,
)
async fn save_flash( &self, _req: &mut Request, depot: &mut Depot, _res: &mut Response, flash: Flash, )
Save the flash messages to the store.
Source§async fn clear_flash(&self, depot: &mut Depot, _res: &mut Response)
async fn clear_flash(&self, depot: &mut Depot, _res: &mut Response)
Clear the flash store.
Auto Trait Implementations§
impl Freeze for SessionStore
impl RefUnwindSafe for SessionStore
impl Send for SessionStore
impl Sync for SessionStore
impl Unpin for SessionStore
impl UnwindSafe for SessionStore
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