Expand description
Parsing utilities for Cookie.
This module provides functionality for parsing Cookie instances from strings.
It supports both strict and lenient parsing modes and handles attributes such as
Domain, Path, Max-Age, Secure, and more.
§Features
- Flexible parsing with
parseandparse_strictmethods. - Detailed error handling using
ParseErrorandParseSameSiteError. - Support for common cookie attributes.
§Example
use cookie_rs::prelude::*;
let cookie = Cookie::parse("session=abc123; Path=/; Secure").unwrap();
assert_eq!(cookie.name(), "session");
assert_eq!(cookie.value(), "abc123");
assert_eq!(cookie.path(), Some("/"));
assert_eq!(cookie.secure(), Some(true));Re-exports§
pub use self::error::*;