pub struct ChannelMessage {
pub id: MessageId,
pub conversation: ConversationId,
pub author: String,
pub content: MessageContent,
pub thread_id: Option<ThreadId>,
pub reply_to: Option<MessageId>,
pub timestamp: DateTime<Utc>,
pub attachments: Vec<Attachment>,
pub metadata: HashMap<String, String>,
}Expand description
A message sent or received on a messaging channel.
Fields§
§id: MessageIdUnique identifier for this message.
conversation: ConversationIdThe conversation this message belongs to.
The author of the message (display name or user identifier).
content: MessageContentThe message content.
thread_id: Option<ThreadId>Optional thread this message belongs to.
reply_to: Option<MessageId>Optional message this is a reply to.
timestamp: DateTime<Utc>When the message was created.
attachments: Vec<Attachment>File or media attachments.
metadata: HashMap<String, String>Arbitrary key-value metadata.
Trait Implementations§
Source§impl Clone for ChannelMessage
impl Clone for ChannelMessage
Source§fn clone(&self) -> ChannelMessage
fn clone(&self) -> ChannelMessage
Returns a duplicate of the value. Read more
1.0.0 · 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 ChannelMessage
impl Debug for ChannelMessage
Source§impl<'de> Deserialize<'de> for ChannelMessage
impl<'de> Deserialize<'de> for ChannelMessage
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
Source§impl JsonSchema for ChannelMessage
impl JsonSchema for ChannelMessage
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ChannelMessage
impl RefUnwindSafe for ChannelMessage
impl Send for ChannelMessage
impl Sync for ChannelMessage
impl Unpin for ChannelMessage
impl UnsafeUnpin for ChannelMessage
impl UnwindSafe for ChannelMessage
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