pub struct SessionManager { /* private fields */ }
Expand description
Manages multiple sessions and provides session lifecycle management
Implementations§
Source§impl SessionManager
impl SessionManager
Sourcepub fn create_session(&self) -> Result<SessionId>
pub fn create_session(&self) -> Result<SessionId>
Create a new session
Sourcepub fn get_or_create_session(
&self,
session_id: Option<SessionId>,
) -> Result<SessionId>
pub fn get_or_create_session( &self, session_id: Option<SessionId>, ) -> Result<SessionId>
Get a session by ID (create if not exists)
Sourcepub fn get_session(
&self,
session_id: &SessionId,
) -> Result<Option<SessionState>>
pub fn get_session( &self, session_id: &SessionId, ) -> Result<Option<SessionState>>
Get session state (readonly)
Sourcepub fn record_analysis(
&self,
session_id: &SessionId,
tool_name: String,
parameters: Value,
success: bool,
result_summary: Option<String>,
symbols_analyzed: Vec<String>,
) -> Result<()>
pub fn record_analysis( &self, session_id: &SessionId, tool_name: String, parameters: Value, success: bool, result_summary: Option<String>, symbols_analyzed: Vec<String>, ) -> Result<()>
Update session with analysis record
Sourcepub fn cleanup_expired_sessions(&self) -> Result<usize>
pub fn cleanup_expired_sessions(&self) -> Result<usize>
Clean up expired sessions
Sourcepub fn active_session_count(&self) -> Result<usize>
pub fn active_session_count(&self) -> Result<usize>
Get active session count
Trait Implementations§
Source§impl Debug for SessionManager
impl Debug for SessionManager
Auto Trait Implementations§
impl Freeze for SessionManager
impl RefUnwindSafe for SessionManager
impl Send for SessionManager
impl Sync for SessionManager
impl Unpin for SessionManager
impl UnwindSafe for SessionManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more