pub struct SessionEntry {
pub id: Uuid,
pub timestamp: Timestamp,
pub entry_type: EntryType,
pub content: Value,
}Expand description
A single entry in a session.
Fields§
§id: UuidUnique entry identifier.
timestamp: TimestampWhen the entry was created.
entry_type: EntryTypeType of entry.
content: ValueEntry content/data.
Implementations§
Source§impl SessionEntry
impl SessionEntry
Sourcepub fn user_message(content: impl Into<String>) -> Self
pub fn user_message(content: impl Into<String>) -> Self
Create a user message entry.
Sourcepub fn assistant_message(content: impl Into<String>) -> Self
pub fn assistant_message(content: impl Into<String>) -> Self
Create an assistant message entry.
Trait Implementations§
Source§impl Clone for SessionEntry
impl Clone for SessionEntry
Source§fn clone(&self) -> SessionEntry
fn clone(&self) -> SessionEntry
Returns a duplicate of the value. Read more
1.0.0 · 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 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
Auto Trait Implementations§
impl Freeze for SessionEntry
impl RefUnwindSafe for SessionEntry
impl Send for SessionEntry
impl Sync for SessionEntry
impl Unpin 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