pub struct SessionTruncatedAction {
pub turn_id: Option<String>,
}Expand description
Truncates a session’s history. If turnId is provided, all turns after that
turn are removed and the specified turn is kept. If turnId is omitted, all
turns are removed.
If there is an active turn it is silently dropped and the session status
returns to idle.
Common use-case: truncate old data then dispatch a new
session/turnStarted with an edited message.
Fields§
§turn_id: Option<String>Keep turns up to and including this turn. Omit to clear all turns.
Trait Implementations§
Source§impl Clone for SessionTruncatedAction
impl Clone for SessionTruncatedAction
Source§fn clone(&self) -> SessionTruncatedAction
fn clone(&self) -> SessionTruncatedAction
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 SessionTruncatedAction
impl Debug for SessionTruncatedAction
Source§impl Default for SessionTruncatedAction
impl Default for SessionTruncatedAction
Source§fn default() -> SessionTruncatedAction
fn default() -> SessionTruncatedAction
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SessionTruncatedAction
impl<'de> Deserialize<'de> for SessionTruncatedAction
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 SessionTruncatedAction
impl PartialEq for SessionTruncatedAction
Source§fn eq(&self, other: &SessionTruncatedAction) -> bool
fn eq(&self, other: &SessionTruncatedAction) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SessionTruncatedAction
impl Serialize for SessionTruncatedAction
impl StructuralPartialEq for SessionTruncatedAction
Auto Trait Implementations§
impl Freeze for SessionTruncatedAction
impl RefUnwindSafe for SessionTruncatedAction
impl Send for SessionTruncatedAction
impl Sync for SessionTruncatedAction
impl Unpin for SessionTruncatedAction
impl UnsafeUnpin for SessionTruncatedAction
impl UnwindSafe for SessionTruncatedAction
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