pub struct AssistantTranscriptEvent {
pub index: u64,
pub recorded_at: DateTime<Utc>,
pub payload: Payload,
}Expand description
One durable transcript event at its store-assigned index.
Fields§
§index: u64The event’s dense position in the session’s transcript, assigned by the store inside the append. Zero-based and contiguous.
recorded_at: DateTime<Utc>When the server recorded it.
payload: PayloadThe event itself, type-erased — the serialized
aion_core::AssistantSessionEvent the socket streams. Carried as a
Payload because the store is type-erased by construction: it
persists bytes and a content-type tag, never a domain type it would have
to keep in step.
Implementations§
Source§impl AssistantTranscriptEvent
impl AssistantTranscriptEvent
Sourcepub fn encode(&self) -> Result<Vec<u8>, StoreError>
pub fn encode(&self) -> Result<Vec<u8>, StoreError>
Encode the stable backend-neutral representation.
§Errors
StoreError::Serialization when serialization fails.
Sourcepub fn decode(bytes: &[u8]) -> Result<Self, StoreError>
pub fn decode(bytes: &[u8]) -> Result<Self, StoreError>
Decode a stored representation.
§Errors
StoreError::Serialization for malformed bytes or an unknown field.
Trait Implementations§
Source§impl Clone for AssistantTranscriptEvent
impl Clone for AssistantTranscriptEvent
Source§fn clone(&self) -> AssistantTranscriptEvent
fn clone(&self) -> AssistantTranscriptEvent
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 AssistantTranscriptEvent
impl Debug for AssistantTranscriptEvent
Source§impl<'de> Deserialize<'de> for AssistantTranscriptEvent
impl<'de> Deserialize<'de> for AssistantTranscriptEvent
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
impl Eq for AssistantTranscriptEvent
Source§impl PartialEq for AssistantTranscriptEvent
impl PartialEq for AssistantTranscriptEvent
Source§impl Serialize for AssistantTranscriptEvent
impl Serialize for AssistantTranscriptEvent
impl StructuralPartialEq for AssistantTranscriptEvent
Auto Trait Implementations§
impl Freeze for AssistantTranscriptEvent
impl RefUnwindSafe for AssistantTranscriptEvent
impl Send for AssistantTranscriptEvent
impl Sync for AssistantTranscriptEvent
impl Unpin for AssistantTranscriptEvent
impl UnsafeUnpin for AssistantTranscriptEvent
impl UnwindSafe for AssistantTranscriptEvent
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