pub struct Cookie { /* private fields */ }
Available on crate feature
cookies
only.Expand description
Information stored about an HTTP cookie.
Comparison operators
You can use the equals operator to compare the value of a cookie with a string directly for convenience. In other words, this:
ⓘ
assert_eq!(cookie.value(), "foo");
is equivalent to this:
ⓘ
assert_eq!(cookie, "foo");
Implementations
sourceimpl Cookie
impl Cookie
sourcepub fn builder<N, V>(name: N, value: V) -> CookieBuilderwhere
N: Into<String>,
V: Into<String>,
pub fn builder<N, V>(name: N, value: V) -> CookieBuilderwhere
N: Into<String>,
V: Into<String>,
Create a new cookie builder with a given name and value.
See CookieBuilder::new
for an example.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Cookie
impl Send for Cookie
impl Sync for Cookie
impl Unpin for Cookie
impl UnwindSafe for Cookie
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more