pub struct MessageSummary {
pub role: String,
pub preview: String,
pub timestamp: Option<DateTime<Utc>>,
pub is_compressed: bool,
pub original_index: usize,
}Expand description
Message summary for display (lightweight version). Used when full message content is compressed but user still needs to see history.
Fields§
§role: StringRole of the message sender.
preview: StringBrief preview of content (truncated).
timestamp: Option<DateTime<Utc>>Timestamp (if available).
is_compressed: boolWhether this message was compressed.
original_index: usizeOriginal message index before compression.
Implementations§
Source§impl MessageSummary
impl MessageSummary
Sourcepub fn from_message(msg: &Message, index: usize) -> Self
pub fn from_message(msg: &Message, index: usize) -> Self
Create a summary from a message.
Trait Implementations§
Source§impl Clone for MessageSummary
impl Clone for MessageSummary
Source§fn clone(&self) -> MessageSummary
fn clone(&self) -> MessageSummary
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 MessageSummary
impl Debug for MessageSummary
Source§impl<'de> Deserialize<'de> for MessageSummary
impl<'de> Deserialize<'de> for MessageSummary
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 MessageSummary
impl RefUnwindSafe for MessageSummary
impl Send for MessageSummary
impl Sync for MessageSummary
impl Unpin for MessageSummary
impl UnsafeUnpin for MessageSummary
impl UnwindSafe for MessageSummary
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