Struct isahc::cookies::CookieJar [−][src]
pub struct CookieJar { /* fields omitted */ }
Provides automatic cookie session management using an in-memory cookie store.
Cookie jars are designed to be shareable across many concurrent requests, so cloning the jar simply returns a new reference to the jar instead of doing a deep clone.
This cookie jar implementation seeks to conform to the rules for client state management as described in RFC 6265.
Domain isolation
Cookies are isolated from each other based on the domain and path they are received from. As such, most methods require you to specify a URI, since unrelated websites can have cookies with the same name without conflict.
Implementations
impl CookieJar
[src]
pub fn new() -> Self
[src]
Create a new, empty cookie jar.
pub fn get_by_name(&self, uri: &Uri, cookie_name: &str) -> Option<Cookie>
[src]
Get a cookie by name for the given URI.
pub fn get_for_uri(&self, uri: &Uri) -> impl IntoIterator<Item = Cookie>
[src]
Get a copy of all the cookies in the jar that match the given URI.
The returned collection contains a copy of all the cookies matching the URI at the time this function was called. The collection is not a “live” view into the cookie jar; concurrent changes made to the jar (cookies inserted or removed) will not be reflected in the collection.
pub fn clear(&self)
[src]
Remove all cookies from this cookie jar.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CookieJar
impl Send for CookieJar
impl Sync for CookieJar
impl Unpin for CookieJar
impl UnwindSafe for CookieJar
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,