pub struct SessionEntry {
pub id: EntryId,
pub parent_id: Option<EntryId>,
pub timestamp: IsoTimestamp,
pub kind: EntryKind,
}Expand description
One tree entry (every line after the header).
Fields§
§id: EntryIdEntry id.
parent_id: Option<EntryId>Parent entry; null for roots (always serialised).
timestamp: IsoTimestampCreation time.
kind: EntryKindType-specific payload (type tag).
Implementations§
Source§impl SessionEntry
impl SessionEntry
Sourcepub const fn message(&self) -> Option<&AgentMessage>
pub const fn message(&self) -> Option<&AgentMessage>
The message of a message entry.
Sourcepub const fn is_system_message(&self) -> bool
pub const fn is_system_message(&self) -> bool
true for message entries whose role is system.
Trait Implementations§
Source§impl Clone for SessionEntry
impl Clone for SessionEntry
Source§impl Debug for SessionEntry
impl Debug for SessionEntry
Source§impl<'de> Deserialize<'de> for SessionEntry
impl<'de> Deserialize<'de> for SessionEntry
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 FromIterator<SessionEntry> for EntryIndex
impl FromIterator<SessionEntry> for EntryIndex
Source§fn from_iter<I: IntoIterator<Item = SessionEntry>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = SessionEntry>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl PartialEq for SessionEntry
impl PartialEq for SessionEntry
Source§impl Serialize for SessionEntry
impl Serialize for SessionEntry
impl StructuralPartialEq for SessionEntry
Auto Trait Implementations§
impl Freeze for SessionEntry
impl RefUnwindSafe for SessionEntry
impl Send for SessionEntry
impl Sync for SessionEntry
impl Unpin for SessionEntry
impl UnsafeUnpin for SessionEntry
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