pub struct CookieJar { /* private fields */ }Expand description
A simple cookie jar for maintaining cookies across requests.
Cookies are stored as name-value pairs and automatically added to subsequent requests.
Implementations§
Source§impl CookieJar
impl CookieJar
Sourcepub fn set(&mut self, name: impl Into<String>, value: impl Into<String>)
pub fn set(&mut self, name: impl Into<String>, value: impl Into<String>)
Sets a cookie in the jar.
Formats cookies for the Cookie header.
Formats cookies for the Cookie header for a specific request.
This applies the cookie matching rules needed for session persistence: domain, path, secure, and expiration.
Parses a Set-Cookie header and updates the jar.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CookieJar
impl RefUnwindSafe for CookieJar
impl Send for CookieJar
impl Sync for CookieJar
impl Unpin for CookieJar
impl UnwindSafe for CookieJar
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: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).