#[non_exhaustive]pub struct MessageResponse {
pub id: String,
pub content: String,
pub peer_id: String,
pub session_id: String,
pub metadata: HashMap<String, Value>,
pub created_at: DateTime<Utc>,
pub workspace_id: String,
pub token_count: u64,
}Expand description
Raw API response for a message.
Represents a single message created by a peer within a session.
Use the top-level crate::Message wrapper for the enriched type.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringUnique message identifier.
content: StringMessage content text.
peer_id: StringID of the peer that authored this message.
session_id: StringID of the session this message belongs to.
metadata: HashMap<String, Value>Arbitrary key-value metadata attached to the message.
created_at: DateTime<Utc>Timestamp when the message was created.
workspace_id: StringID of the workspace this message belongs to.
token_count: u64Token count for the message content.
Trait Implementations§
Source§impl Clone for MessageResponse
impl Clone for MessageResponse
Source§fn clone(&self) -> MessageResponse
fn clone(&self) -> MessageResponse
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 MessageResponse
impl Debug for MessageResponse
Source§impl<'de> Deserialize<'de> for MessageResponse
impl<'de> Deserialize<'de> for MessageResponse
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 PartialEq for MessageResponse
impl PartialEq for MessageResponse
Source§fn eq(&self, other: &MessageResponse) -> bool
fn eq(&self, other: &MessageResponse) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MessageResponse
impl Serialize for MessageResponse
impl StructuralPartialEq for MessageResponse
Auto Trait Implementations§
impl Freeze for MessageResponse
impl RefUnwindSafe for MessageResponse
impl Send for MessageResponse
impl Sync for MessageResponse
impl Unpin for MessageResponse
impl UnsafeUnpin for MessageResponse
impl UnwindSafe for MessageResponse
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