pub struct ChatTurnsLoadedAction {
pub turns: Vec<Turn>,
pub turns_next_cursor: Option<String>,
}Expand description
Loads older completed turns into this chat’s state.
Hosts dispatch this before responding to fetchTurns, and before applying
any operation that references a turn older than the currently loaded window.
turns is ordered oldest-first and is prepended to the current turns
window. turnsNextCursor replaces the state’s cursor; omit it when all
retained turns are now loaded.
Fields§
§turns: Vec<Turn>Older completed turns loaded into the state, ordered oldest-first.
turns_next_cursor: Option<String>Opaque cursor for loading the next older page, if one remains.
Trait Implementations§
Source§impl Clone for ChatTurnsLoadedAction
impl Clone for ChatTurnsLoadedAction
Source§fn clone(&self) -> ChatTurnsLoadedAction
fn clone(&self) -> ChatTurnsLoadedAction
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 ChatTurnsLoadedAction
impl Debug for ChatTurnsLoadedAction
Source§impl<'de> Deserialize<'de> for ChatTurnsLoadedAction
impl<'de> Deserialize<'de> for ChatTurnsLoadedAction
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 ChatTurnsLoadedAction
impl PartialEq for ChatTurnsLoadedAction
Source§fn eq(&self, other: &ChatTurnsLoadedAction) -> bool
fn eq(&self, other: &ChatTurnsLoadedAction) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ChatTurnsLoadedAction
impl Serialize for ChatTurnsLoadedAction
impl StructuralPartialEq for ChatTurnsLoadedAction
Auto Trait Implementations§
impl Freeze for ChatTurnsLoadedAction
impl RefUnwindSafe for ChatTurnsLoadedAction
impl Send for ChatTurnsLoadedAction
impl Sync for ChatTurnsLoadedAction
impl Unpin for ChatTurnsLoadedAction
impl UnsafeUnpin for ChatTurnsLoadedAction
impl UnwindSafe for ChatTurnsLoadedAction
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