Skip to main content

http_type/cookie/
enum.rs

1use super::*;
2
3/// Represents the reasons a cookie cannot be built or parsed.
4///
5/// The variants name the part of the cookie that was refused, so a caller can
6/// tell a malformed name apart from a malformed value.
7#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
8pub enum CookieError {
9    /// The cookie name is not a token.
10    InvalidName,
11    /// The cookie value carries a character that may not appear in one.
12    InvalidValue,
13    /// The cookie attribute carries a character that may not appear in one.
14    InvalidAttribute,
15    /// Unknown error
16    #[default]
17    Unknown,
18}