pub struct MessageCollection {Show 14 fields
pub schema_name: String,
pub schema_version: u64,
pub collection_uid: String,
pub collection_name: String,
pub status: String,
pub tags: Vec<String>,
pub created_rfc3339: Option<String>,
pub updated_rfc3339: Option<String>,
pub archived_rfc3339: Option<String>,
pub message_count: usize,
pub thread_count: usize,
pub attachment_count: usize,
pub last_message_rfc3339: Option<String>,
pub items: Vec<MessageCollectionItem>,
}Fields§
§schema_name: String§schema_version: u64§collection_uid: String§collection_name: String§status: String§created_rfc3339: Option<String>§updated_rfc3339: Option<String>§archived_rfc3339: Option<String>§message_count: usize§thread_count: usize§attachment_count: usize§last_message_rfc3339: Option<String>§items: Vec<MessageCollectionItem>Implementations§
Source§impl MessageCollection
impl MessageCollection
pub fn new( schema_name: &str, collection_uid: &str, collection_name: &str, ) -> Self
pub fn new_case(case_uid: &str, case_name: &str, now_rfc3339: &str) -> Self
pub fn new_notification( archive_uid: &str, archive_name: &str, now_rfc3339: &str, ) -> Self
pub fn message_ids(&self) -> Vec<String>
pub fn contains_message(&self, message_id: &str) -> bool
pub fn upsert_item( &mut self, message_id: &str, summary: Option<&str>, added_rfc3339: &str, ) -> bool
pub fn merge_items(&mut self, items: &[MessageCollectionItem])
pub fn normalize( &mut self, schema_name: &str, collection_uid: &str, collection_name: &str, )
Trait Implementations§
Source§impl Clone for MessageCollection
impl Clone for MessageCollection
Source§fn clone(&self) -> MessageCollection
fn clone(&self) -> MessageCollection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MessageCollection
impl Debug for MessageCollection
Source§impl<'de> Deserialize<'de> for MessageCollection
impl<'de> Deserialize<'de> for MessageCollection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MessageCollection
Source§impl PartialEq for MessageCollection
impl PartialEq for MessageCollection
Source§fn eq(&self, other: &MessageCollection) -> bool
fn eq(&self, other: &MessageCollection) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MessageCollection
impl Serialize for MessageCollection
impl StructuralPartialEq for MessageCollection
Auto Trait Implementations§
impl Freeze for MessageCollection
impl RefUnwindSafe for MessageCollection
impl Send for MessageCollection
impl Sync for MessageCollection
impl Unpin for MessageCollection
impl UnsafeUnpin for MessageCollection
impl UnwindSafe for MessageCollection
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.