#[non_exhaustive]pub struct CookieStore {
pub max_age: Duration,
pub same_site: SameSite,
pub http_only: bool,
pub path: String,
pub name: String,
}Available on crate feature
cookie-store only.Expand description
CookieStore is a FlashStore implementation that stores the flash messages in a cookie.
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.max_age: DurationThe cookie max age.
same_site: SameSiteThe cookie same site.
http_only: boolThe cookie http only.
path: StringThe cookie path.
name: StringThe cookie name.
Implementations§
Source§impl CookieStore
impl CookieStore
Sourcepub fn into_handler(self) -> FlashHandler<CookieStore>
pub fn into_handler(self) -> FlashHandler<CookieStore>
Into FlashHandler.
Trait Implementations§
Source§impl Debug for CookieStore
impl Debug for CookieStore
Source§impl Default for CookieStore
impl Default for CookieStore
Source§impl FlashStore for CookieStore
impl FlashStore for CookieStore
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 CookieStore
impl RefUnwindSafe for CookieStore
impl Send for CookieStore
impl Sync for CookieStore
impl Unpin for CookieStore
impl UnwindSafe for CookieStore
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