pub struct Cookie {
pub name: String,
pub value: String,
pub domain: String,
pub path: String,
pub expiry_time: i64,
pub creation_time: i64,
pub last_access_time: i64,
pub persistent: bool,
pub host_only: bool,
pub secure: bool,
pub http_only: bool,
}Fields§
§name: String§value: String§domain: String§path: String§expiry_time: i64§creation_time: i64§last_access_time: i64§persistent: bool§host_only: bool§secure: bool§http_only: boolImplementations§
Source§impl Cookie
impl Cookie
pub fn new(name: &str, value: &str, domain: &str) -> Self
pub fn match_request( &self, host: &str, path: &str, date: i64, secure: bool, ) -> bool
pub fn is_expired(&self, base_time: i64) -> bool
pub fn to_netscape_line(&self) -> String
pub fn parse_netscape_line(line: &str) -> Option<Self>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more