Trait CookiesConnExt

Source
pub trait CookiesConnExt {
    // Required methods
    fn with_cookie<'a>(self, cookie: impl Into<Cookie<'a>>) -> Self;
    fn cookies(&self) -> &CookieJar;
    fn cookies_mut(&mut self) -> &mut CookieJar;
}
Expand description

Extension trait adding cookie capacities to [Conn].

Important: The CookiesHandler must be called before any of these functions can be called on a conn.

Required Methods§

adds a cookie to the cookie jar and returns the conn

Source

fn cookies(&self) -> &CookieJar

gets a reference to the cookie jar

Source

fn cookies_mut(&mut self) -> &mut CookieJar

gets a mutable reference to the cookie jar

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl CookiesConnExt for Conn

Source§

fn cookies(&self) -> &CookieJar

Source§

fn cookies_mut(&mut self) -> &mut CookieJar

Implementors§