diff --git a/CHANGELOG.md b/CHANGELOG.md index 04054ed..499c927 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +jmap-client 0.3.0 +================================ +- Set timeouts using `Duration` instead of `u64`. +- SetError handling of unknown properties. + jmap-client 0.2.1 ================================ - Using maybe_async to reduce duplicate code. diff --git a/Cargo.toml b/Cargo.toml index 406bd18..50b2b97 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "jmap-client" description = "JMAP client library for Rust" -version = "0.2.1" +version = "0.3.0" edition = "2021" authors = [ "Stalwart Labs Ltd. "] license = "Apache-2.0 OR MIT" diff --git a/src/email/mod.rs b/src/email/mod.rs index 72d084b..75b96c4 100644 --- a/src/email/mod.rs +++ b/src/email/mod.rs @@ -323,6 +323,7 @@ pub enum Property { HasAttachment, Preview, Header(Header), + Other(String), } #[derive(Debug, Clone, Serialize, Deserialize)] @@ -386,7 +387,7 @@ impl Property { "attachments" => Some(Property::Attachments), "bodyStructure" => Some(Property::BodyStructure), _ if value.starts_with("header:") => Some(Property::Header(Header::parse(value)?)), - _ => None, + _ => Some(Property::Other(value.to_string())), } } } @@ -420,6 +421,7 @@ impl Display for Property { Property::HasAttachment => write!(f, "hasAttachment"), Property::Preview => write!(f, "preview"), Property::Header(header) => header.fmt(f), + Property::Other(other) => write!(f, "{}", other), } } }