pub trait Prefix: Sealed {
const PREFIX: &'static str;
const Host: Host = Host;
const Secure: Secure = Secure;
// Required method
fn conform(cookie: Cookie<'_>) -> Cookie<'_>;
}
Expand description
Trait identifying HTTP RFC6265 draft cookie prefixes.
A Prefix
can be applied to cookies via a child PrefixedJar
, itself
obtainable via CookieJar::prefixed()
and CookieJar::prefixed_mut()
.
Cookies added/retrieved to/from these child jars have the corresponding
prefix automatically prepended/removed as needed.
Additionally, added cookies are automatically make to
conform.
Note: Cookie prefixes are specified in an HTTP draft! Their meaning and definition are subject to change.
Required Associated Constants§
sourceconst PREFIX: &'static str
const PREFIX: &'static str
The prefix string to prepend.
See Host::PREFIX
and Secure::PREFIX
for specifics.
Provided Associated Constants§
Required Methods§
sourcefn conform(cookie: Cookie<'_>) -> Cookie<'_>
fn conform(cookie: Cookie<'_>) -> Cookie<'_>
Modify cookie
so it conforms to the requirements of self
.
See Host::conform()
and Secure::conform()
for specifics.
Object Safety§
This trait is not object safe.