pub struct SessionState {
pub session_id: String,
pub events: Vec<SessionEvent>,
pub cumulative_risk: f64,
pub escalation_count: u32,
pub created_at: Instant,
pub last_activity: Instant,
}Expand description
Accumulated state for a single conversation session.
Fields§
§session_id: StringUnique session identifier.
events: Vec<SessionEvent>Ordered list of events in this session.
cumulative_risk: f64Running sum of per-event risk scores.
escalation_count: u32Number of turns where risk increased relative to the prior turn.
created_at: InstantWhen the session was created.
last_activity: InstantTimestamp of the most recent event.
Trait Implementations§
Source§impl Clone for SessionState
impl Clone for SessionState
Source§fn clone(&self) -> SessionState
fn clone(&self) -> SessionState
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 moreAuto Trait Implementations§
impl Freeze for SessionState
impl RefUnwindSafe for SessionState
impl Send for SessionState
impl Sync for SessionState
impl Unpin for SessionState
impl UnsafeUnpin for SessionState
impl UnwindSafe for SessionState
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