pub struct SessionConfig {
pub cookie_name: String,
pub secure: bool,
pub http_only: bool,
pub same_site: SameSite,
pub path: String,
pub max_age: Option<Duration>,
}Expand description
Configuration for session cookies.
Fields§
The name of the session cookie.
secure: boolWhether the cookie should only be sent over HTTPS.
http_only: boolWhether the cookie should be inaccessible to client-side scripts.
same_site: SameSiteThe SameSite attribute for the cookie.
path: StringThe path for which the cookie is valid.
max_age: Option<Duration>The maximum age of the session.
Trait Implementations§
Source§impl Clone for SessionConfig
impl Clone for SessionConfig
Source§fn clone(&self) -> SessionConfig
fn clone(&self) -> SessionConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionConfig
impl Debug for SessionConfig
Auto Trait Implementations§
impl Freeze for SessionConfig
impl RefUnwindSafe for SessionConfig
impl Send for SessionConfig
impl Sync for SessionConfig
impl Unpin for SessionConfig
impl UnwindSafe for SessionConfig
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