Struct tsukuyomi::context::Cookies [−][src]
pub struct Cookies<'a> { /* fields omitted */ }
[unstable] A proxy object for managing Cookie values.
This object is a thin wrapper of 'CookieJar' defined at 'cookie' crate, and it provides some basic APIs for getting the entries of Cookies from an HTTP request or adding/removing Cookie values into an HTTP response.
Methods
impl<'a> Cookies<'a>
[src]
impl<'a> Cookies<'a>
pub fn get(&self, name: &str) -> Option<Cookie<'static>>
[src]
pub fn get(&self, name: &str) -> Option<Cookie<'static>>
Gets a value of Cookie with the provided name from this jar.
pub fn add(&self, cookie: Cookie<'static>)
[src]
pub fn add(&self, cookie: Cookie<'static>)
Adds the provided entry of Cookie into this jar.
pub fn remove(&self, cookie: Cookie<'static>)
[src]
pub fn remove(&self, cookie: Cookie<'static>)
Removes the provided entry of Cookie from this jar.
pub fn with_signed<R>(
&self,
key: &Key,
f: impl FnOnce(SignedJar) -> R
) -> R
[src]
pub fn with_signed<R>(
&self,
key: &Key,
f: impl FnOnce(SignedJar) -> R
) -> R
Creates a proxy object to manage signed Cookies, and passes the value to a closure and get its result.
This method is available only if the feature session
is enabled.
pub fn with_private<R>(
&self,
key: &Key,
f: impl FnOnce(PrivateJar) -> R
) -> R
[src]
pub fn with_private<R>(
&self,
key: &Key,
f: impl FnOnce(PrivateJar) -> R
) -> R
Creates a proxy object to manage encrypted Cookies, and passes the value to a closure and get its result.
This method is available only if the feature session
is enabled.