pub struct SessionEntry {
pub timestamp: Option<String>,
pub entry_type: Option<String>,
pub payload: Value,
}Expand description
One line of a session log.
Fields§
§timestamp: Option<String>Envelope timestamp, when the line has an envelope.
entry_type: Option<String>Envelope type: event_msg, response_item, turn_context, and so on.
None for a legacy line, which has no envelope. In that case
payload is the whole line.
payload: ValueThe payload, or the whole line for a legacy entry.
Modern envelope extensions, such as paginated ordinal, are not retained.
Implementations§
Source§impl SessionEntry
impl SessionEntry
Sourcepub fn payload_type(&self) -> Option<&str>
pub fn payload_type(&self) -> Option<&str>
The payload’s own type, which is the useful discriminator.
For a modern event_msg this is agent_message, token_count, and
so on; for a response_item, message or reasoning.
Sourcepub fn record(&self) -> Option<SessionRecord>
pub fn record(&self) -> Option<SessionRecord>
What this entry means, or None for one this crate does not type.
Always None for a legacy line without an envelope.
Trait Implementations§
Source§impl Clone for SessionEntry
impl Clone for SessionEntry
Source§impl Debug for SessionEntry
impl Debug for SessionEntry
Source§impl PartialEq for SessionEntry
impl PartialEq for SessionEntry
impl StructuralPartialEq for SessionEntry
Auto Trait Implementations§
impl Forget for SessionEntry
impl Freeze for SessionEntrywhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
impl Move for SessionEntry
impl RefUnwindSafe for SessionEntry
impl Send for SessionEntry
impl Sync for SessionEntry
impl Unpin for SessionEntry
impl UnsafeUnpin for SessionEntrywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
impl UnwindSafe for SessionEntry
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