pub struct Cookie {
pub domain: Vec<u8>,
pub tail_match: bool,
pub path: Vec<u8>,
pub secure: bool,
pub expires: u64,
pub name: Vec<u8>,
pub value: Vec<u8>,
pub http_only: bool,
pub prefix: CookiePrefix,
}Expand description
One parsed cookie record from a Netscape cookie file.
String-like fields are byte buffers rather than Strings because cookie jar
files seen in the wild may contain non-UTF-8 octets.
Fields§
§domain: Vec<u8>Cookie domain with one leading dot removed, matching curl’s behavior.
tail_match: boolWhether the original tail-match field was TRUE, case-insensitively.
path: Vec<u8>Sanitized cookie path.
Relative and malformed paths are normalized to /; non-root paths have
one trailing slash removed.
secure: boolWhether the original secure field was TRUE, case-insensitively.
expires: u64Expiration timestamp parsed as an unsigned integer.
name: Vec<u8>Raw cookie name bytes.
value: Vec<u8>Raw cookie value bytes.
http_only: boolWhether this line used curl’s #HttpOnly_ cookie marker.
prefix: CookiePrefixRecognized security prefix in the cookie name.
Trait Implementations§
impl Eq for Cookie
impl StructuralPartialEq for Cookie
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