#[non_exhaustive]pub struct HistoryPage {
pub session_id: SessionId,
pub messages: Vec<SessionMessage>,
pub next_cursor: Option<HistoryCursor>,
}Expand description
One bounded page of a session conversation.
Messages are ordered oldest-first by canonical event sequence. A page never
implies that the complete history was loaded: continue with
next_cursor when it is present.
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.session_id: SessionIdThe session this page belongs to.
messages: Vec<SessionMessage>Messages in canonical event-sequence order, oldest first.
next_cursor: Option<HistoryCursor>Opaque continuation cursor, or None when the snapshot is exhausted.
Implementations§
Source§impl HistoryPage
impl HistoryPage
Sourcepub fn iter(&self) -> impl ExactSizeIterator<Item = &SessionMessage>
pub fn iter(&self) -> impl ExactSizeIterator<Item = &SessionMessage>
Iterate over messages in canonical event-sequence order.
Trait Implementations§
Source§impl Clone for HistoryPage
impl Clone for HistoryPage
Source§fn clone(&self) -> HistoryPage
fn clone(&self) -> HistoryPage
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 HistoryPage
impl Debug for HistoryPage
Source§impl PartialEq for HistoryPage
impl PartialEq for HistoryPage
impl StructuralPartialEq for HistoryPage
Auto Trait Implementations§
impl Freeze for HistoryPage
impl RefUnwindSafe for HistoryPage
impl Send for HistoryPage
impl Sync for HistoryPage
impl Unpin for HistoryPage
impl UnsafeUnpin for HistoryPage
impl UnwindSafe for HistoryPage
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