pub struct TranscriptModel { /* private fields */ }Expand description
Transcript state for a single frontend attachment.
Implementations§
Source§impl TranscriptModel
impl TranscriptModel
Sourcepub fn from_history(
history: &[ChatMessage],
history_cursor: u64,
) -> TranscriptModel
pub fn from_history( history: &[ChatMessage], history_cursor: u64, ) -> TranscriptModel
Project the canonical history half of an atomic frontend attachment.
history_cursor marks every live event already represented by it.
pub fn cells(&self) -> &[TranscriptCell]
pub fn last_sequence(&self) -> u64
Sourcepub fn resolve_frontend_request(
&mut self,
request_id: u64,
resolution: &str,
) -> bool
pub fn resolve_frontend_request( &mut self, request_id: u64, resolution: &str, ) -> bool
Complete the pending transcript cell for one exactly-once frontend response while retaining both the original request payload and the human-readable resolution.
Sourcepub fn apply_event(&mut self, event: &SdkEvent) -> bool
pub fn apply_event(&mut self, event: &SdkEvent) -> bool
Apply one sequenced event. Returns true only when visible state
changed. Replayed or transport-duplicated sequence numbers are ignored.
Trait Implementations§
Source§impl Clone for TranscriptModel
impl Clone for TranscriptModel
Source§fn clone(&self) -> TranscriptModel
fn clone(&self) -> TranscriptModel
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 TranscriptModel
impl Debug for TranscriptModel
Source§impl Default for TranscriptModel
impl Default for TranscriptModel
Source§fn default() -> TranscriptModel
fn default() -> TranscriptModel
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TranscriptModel
impl RefUnwindSafe for TranscriptModel
impl Send for TranscriptModel
impl Sync for TranscriptModel
impl Unpin for TranscriptModel
impl UnsafeUnpin for TranscriptModel
impl UnwindSafe for TranscriptModel
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more