Trait trillium_cookies::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

Object Safety§

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§