Struct mendes::cookies::CookieMeta
source · pub struct CookieMeta<'a> {
pub domain: Option<&'a str>,
pub http_only: bool,
pub max_age: u32,
pub path: &'a str,
pub same_site: Option<SameSite>,
pub secure: bool,
}
Available on crate feature
cookies
only.Fields§
§domain: Option<&'a str>
Defines the host to which the cookie will be sent
http_only: bool
Forbid JavaScript access to the cookie
Defaults to false
.
max_age: u32
The maximum age for the cookie in seconds
Defaults to 6 hours.
path: &'a str
Set a path prefix to constrain use of the cookie
The browser default here is to use the current directory (removing the last path
segment from the current URL), which seems pretty useless. Instead, we default to /
here.
same_site: Option<SameSite>
Controls whether the cookie is sent with cross-origin requests
Defaults to Some(SameSite::None)
.
secure: bool
Restrict the cookie to being sent only over secure connections
Defaults to true
.
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for CookieMeta<'a>
impl<'a> Send for CookieMeta<'a>
impl<'a> Sync for CookieMeta<'a>
impl<'a> Unpin for CookieMeta<'a>
impl<'a> UnwindSafe for CookieMeta<'a>
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