pub struct Message {Show 14 fields
pub id: String,
pub chat_id: String,
pub account_id: Option<String>,
pub sender_id: String,
pub sender_name: Option<String>,
pub text: Option<String>,
pub timestamp: String,
pub sort_key: String,
pub is_edited: Option<bool>,
pub attachments: Option<Vec<Attachment>>,
pub is_unread: Option<bool>,
pub reactions: Option<Vec<Reaction>>,
pub reply_to_id: Option<String>,
pub is_sender: Option<bool>,
}Expand description
A message in a chat
Fields§
§id: StringMessage ID
chat_id: StringChat ID this message belongs to
account_id: Option<String>Account ID the message belongs to
sender_id: StringSender user ID
sender_name: Option<String>Sender display name
text: Option<String>Message text content
timestamp: StringTimestamp in ISO 8601 format
sort_key: StringSort key for pagination
is_edited: Option<bool>Is this message edited?
attachments: Option<Vec<Attachment>>Attachments
is_unread: Option<bool>True if the message is unread
reactions: Option<Vec<Reaction>>Reactions to this message
reply_to_id: Option<String>Message ID this message replies to
is_sender: Option<bool>Is this message from the current user (for previews)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
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
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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