pub struct ChatSessionSummary {
pub id: ChatSessionId,
pub title: String,
pub status: ChatSessionStatus,
pub message_count: usize,
pub last_message_preview: Option<String>,
}Expand description
Compact owned projection of a ChatSessionState for lists and navigation.
§Examples
use ailloli_ui_core::{ChatSessionId, ChatSessionState, ChatSessionStatus};
let summary = ChatSessionState::new(ChatSessionId::from_index(1), "Demo").summary();
assert_eq!(summary.status, ChatSessionStatus::Ready);
assert_eq!(summary.last_message_preview, None);Fields§
§id: ChatSessionIdStable session identity.
title: StringConsumer-facing session title.
status: ChatSessionStatusAggregate session lifecycle.
message_count: usizeNumber of ordered items in the source snapshot.
last_message_preview: Option<String>Truncated final-message text, or None when the session has no messages.
Trait Implementations§
Source§impl Clone for ChatSessionSummary
impl Clone for ChatSessionSummary
Source§fn clone(&self) -> ChatSessionSummary
fn clone(&self) -> ChatSessionSummary
Returns a copy 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 ChatSessionSummary
impl Debug for ChatSessionSummary
Source§impl<'de> Deserialize<'de> for ChatSessionSummary
impl<'de> Deserialize<'de> for ChatSessionSummary
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 ChatSessionSummary
impl PartialEq for ChatSessionSummary
Source§impl Serialize for ChatSessionSummary
impl Serialize for ChatSessionSummary
impl Eq for ChatSessionSummary
impl StructuralPartialEq for ChatSessionSummary
Auto Trait Implementations§
impl Freeze for ChatSessionSummary
impl RefUnwindSafe for ChatSessionSummary
impl Send for ChatSessionSummary
impl Sync for ChatSessionSummary
impl Unpin for ChatSessionSummary
impl UnwindSafe for ChatSessionSummary
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