pub struct SessionRecord {
pub session_id: SessionId,
pub tenant_id: TenantId,
pub provider_id: String,
pub model: String,
pub created_at: Timestamp,
pub activated_at: Option<Timestamp>,
pub closed_at: Option<Timestamp>,
pub ttl_secs: u64,
pub round_count: u64,
pub initial_token_count: u64,
pub delta_token_count: u64,
pub metadata: Value,
}Expand description
Internal data storage for a session, independent of typestate. This is what gets persisted to the database.
Fields§
§session_id: SessionId§tenant_id: TenantId§provider_id: StringProvider that owns this session
model: StringModel locked to this session
created_at: Timestamp§activated_at: Option<Timestamp>§closed_at: Option<Timestamp>§ttl_secs: u64Time-to-live in seconds for this session
round_count: u64Number of tool loop rounds completed
initial_token_count: u64Token count of the initial context (first request)
delta_token_count: u64Cumulative token count of all deltas sent
metadata: ValueArbitrary metadata
Trait Implementations§
Source§impl Clone for SessionRecord
impl Clone for SessionRecord
Source§fn clone(&self) -> SessionRecord
fn clone(&self) -> SessionRecord
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 ComposeSchema for SessionRecord
impl ComposeSchema for SessionRecord
Source§impl Debug for SessionRecord
impl Debug for SessionRecord
Source§impl<'de> Deserialize<'de> for SessionRecord
impl<'de> Deserialize<'de> for SessionRecord
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 PartialEq for SessionRecord
impl PartialEq for SessionRecord
Source§impl Serialize for SessionRecord
impl Serialize for SessionRecord
Source§impl ToSchema for SessionRecord
impl ToSchema for SessionRecord
impl StructuralPartialEq for SessionRecord
Auto Trait Implementations§
impl Freeze for SessionRecord
impl RefUnwindSafe for SessionRecord
impl Send for SessionRecord
impl Sync for SessionRecord
impl Unpin for SessionRecord
impl UnwindSafe for SessionRecord
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