pub struct Options {
pub domain: String,
pub path: String,
pub secure: bool,
pub same_site: SameSite,
pub max_age: Option<Duration>,
}Available on crate feature
cookieutil only.Expand description
Cookie 下发选项; Default 即 Path=/、SameSite=Lax、会话级有效期
Fields§
§domain: StringDomain; 空串不写
path: StringPath; 空串默认 /
secure: boolSecure; 生产环境必须为 true
same_site: SameSiteSameSite
max_age: Option<Duration>有效期 (按整秒截断); None 或不足 1 秒为会话 Cookie (随浏览器关闭失效)
Trait Implementations§
impl Eq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Forget for Options
impl Freeze for Options
impl Move for Options
impl RefUnwindSafe for Options
impl Send for Optionswhere
RawVecInner: Send,
impl Sync for Optionswhere
RawVecInner: Sync,
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Optionswhere
RawVecInner: UnwindSafe,
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