pub struct Cookie {
pub name: String,
pub value: String,
pub expires: Option<OffsetDateTime>,
pub max_age: Option<u64>,
pub domain: Option<String>,
pub path: Option<String>,
pub secure: bool,
pub http_only: bool,
pub same_site: Option<String>,
}Fields§
§name: String§value: String§expires: Option<OffsetDateTime>§max_age: Option<u64>§domain: Option<String>§path: Option<String>§secure: bool§http_only: bool§same_site: Option<String>Implementations§
Source§impl Cookie
impl Cookie
pub fn new(name: &str, value: &str) -> Cookie
pub fn expires(self, expires: OffsetDateTime) -> Cookie
pub fn max_age(self, max_age: u64) -> Cookie
pub fn domain(self, domain: &str) -> Cookie
pub fn path(self, path: &str) -> Cookie
pub fn secure(self, secure: bool) -> Cookie
pub fn http_only(self, http_only: bool) -> Cookie
pub fn same_site(self, same_site: &str) -> Cookie
pub fn to_string(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cookie
impl RefUnwindSafe for Cookie
impl Send for Cookie
impl Sync for Cookie
impl Unpin for Cookie
impl UnsafeUnpin for Cookie
impl UnwindSafe for Cookie
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