pub struct Cookie;Expand description
Parser for HTTP Cookie headers.
Provides functionality to parse Cookie header strings into key-value pairs.
Implementations§
Source§impl Cookie
Implementation for Cookie.
impl Cookie
Implementation for Cookie.
Sourcepub fn parse<C>(
cookie: C,
) -> HashMap<String, String, BuildHasherDefault<Hasher>>
pub fn parse<C>( cookie: C, ) -> HashMap<String, String, BuildHasherDefault<Hasher>>
Parses a Cookie header string into a collection of key-value pairs.
This method takes a Cookie header string (typically from a Cookie request header)
and parses it into a map of cookie names to their values.
§Arguments
AsRef<str>- TheCookieheader string to parse.
§Returns
A Cookies collection (a hash map) containing all parsed cookie key-value pairs.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cookie
impl<'de> Deserialize<'de> for Cookie
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Cookie, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Cookie, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Cookie
impl Serialize for Cookie
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for Cookie
impl Eq for Cookie
impl StructuralPartialEq for Cookie
Auto Trait Implementations§
impl Freeze for Cookie
impl RefUnwindSafe for Cookie
impl Send for Cookie
impl Sync for Cookie
impl Unpin for Cookie
impl UnwindSafe for Cookie
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more