From fa8c0f0d3bf2bbfb7027446a4cddf61df95e2931 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Thu, 14 Nov 2024 12:24:12 +0000 Subject: [PATCH] Add the correct namespace prefixes for serialization to Message --- src/types/common.rs | 89 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/src/types/common.rs b/src/types/common.rs index 68d5d2a..80de1f8 100644 --- a/src/types/common.rs +++ b/src/types/common.rs @@ -420,6 +420,7 @@ pub struct Items { /// /// See #[derive(Clone, Debug, Deserialize, XmlSerialize)] +#[xml_struct(variant_ns_prefix = "t")] pub enum RealItem { Message(Message), } @@ -474,74 +475,162 @@ impl XmlSerialize for DateTime { #[serde(rename_all = "PascalCase")] pub struct Message { /// The MIME content of the item. + #[xml_struct(ns_prefix = "t")] pub mime_content: Option, /// The item's Exchange identifier. + #[xml_struct(ns_prefix = "t")] pub item_id: Option, /// The identifier for the containing folder. /// /// See + #[xml_struct(ns_prefix = "t")] pub parent_folder_id: Option, /// The Exchange class value of the item. /// /// See + #[xml_struct(ns_prefix = "t")] pub item_class: Option, /// The subject of the item. /// /// See + #[xml_struct(ns_prefix = "t")] pub subject: Option, + + #[xml_struct(ns_prefix = "t")] pub sensitivity: Option, + + #[xml_struct(ns_prefix = "t")] pub body: Option, + + #[xml_struct(ns_prefix = "t")] pub attachments: Option, + + #[xml_struct(ns_prefix = "t")] pub date_time_received: Option, + + #[xml_struct(ns_prefix = "t")] pub size: Option, /// A list of categories describing an item. /// /// See + #[xml_struct(ns_prefix = "t")] pub categories: Option>, // Extended MAPI properties to set on the message. + #[xml_struct(ns_prefix = "t")] pub extended_property: Option>, + + #[xml_struct(ns_prefix = "t")] pub importance: Option, + + #[xml_struct(ns_prefix = "t")] pub in_reply_to: Option, + + #[xml_struct(ns_prefix = "t")] pub is_submitted: Option, + + #[xml_struct(ns_prefix = "t")] pub is_draft: Option, + + #[xml_struct(ns_prefix = "t")] pub is_from_me: Option, + + #[xml_struct(ns_prefix = "t")] pub is_resend: Option, + + #[xml_struct(ns_prefix = "t")] pub is_unmodified: Option, + + #[xml_struct(ns_prefix = "t")] pub internet_message_headers: Option, + + #[xml_struct(ns_prefix = "t")] pub date_time_sent: Option, + + #[xml_struct(ns_prefix = "t")] pub date_time_created: Option, + + #[xml_struct(ns_prefix = "t")] pub reminder_due_by: Option, + + #[xml_struct(ns_prefix = "t")] pub reminder_is_set: Option, + + #[xml_struct(ns_prefix = "t")] pub reminder_minutes_before_start: Option, + + #[xml_struct(ns_prefix = "t")] pub display_cc: Option, + + #[xml_struct(ns_prefix = "t")] pub display_to: Option, + + #[xml_struct(ns_prefix = "t")] pub has_attachments: Option, + + #[xml_struct(ns_prefix = "t")] pub culture: Option, + + #[xml_struct(ns_prefix = "t")] pub sender: Option, + + #[xml_struct(ns_prefix = "t")] pub to_recipients: Option, + + #[xml_struct(ns_prefix = "t")] pub cc_recipients: Option, + + #[xml_struct(ns_prefix = "t")] pub bcc_recipients: Option, + + #[xml_struct(ns_prefix = "t")] pub is_read_receipt_requested: Option, + + #[xml_struct(ns_prefix = "t")] pub is_delivery_receipt_requested: Option, + + #[xml_struct(ns_prefix = "t")] pub conversation_index: Option, + + #[xml_struct(ns_prefix = "t")] pub conversation_topic: Option, + + #[xml_struct(ns_prefix = "t")] pub from: Option, + + #[xml_struct(ns_prefix = "t")] pub internet_message_id: Option, + #[xml_struct(ns_prefix = "t")] pub is_read: Option, + + #[xml_struct(ns_prefix = "t")] pub is_response_requested: Option, + + #[xml_struct(ns_prefix = "t")] pub reply_to: Option, + + #[xml_struct(ns_prefix = "t")] pub received_by: Option, + + #[xml_struct(ns_prefix = "t")] pub received_representing: Option, + + #[xml_struct(ns_prefix = "t")] pub last_modified_name: Option, + + #[xml_struct(ns_prefix = "t")] pub last_modified_time: Option, + + #[xml_struct(ns_prefix = "t")] pub is_associated: Option, + + #[xml_struct(ns_prefix = "t")] pub conversation_id: Option, }