pub struct SessionManager { /* private fields */ }Implementations§
Source§impl SessionManager
impl SessionManager
pub fn new( session_id_generator: Arc<dyn SessionIdGenerator>, session_store: Arc<dyn SessionStore>, config: SessionConfig, ) -> Self
pub async fn create_session(&self, system_prompt: Option<&str>) -> SessionId
pub async fn restore_session( &self, session_id: &SessionId, ) -> Option<AgentSession>
pub async fn session(&self, session_id: &SessionId) -> Option<AgentSession>
pub async fn session_or_err( &self, session_id: &SessionId, ) -> AgentResult<AgentSession>
pub async fn with_session_mut<F, R>(
&self,
session_id: &SessionId,
f: F,
) -> AgentResult<R>where
F: FnOnce(&mut AgentSession) -> R,
pub async fn cached_approval( &self, session_id: &SessionId, action_key: &str, ) -> bool
pub async fn cache_approval(&self, session_id: &SessionId, action_key: String)
pub async fn save_session(&self, session_id: &SessionId) -> AgentResult<()>
pub fn session_store(&self) -> &Arc<dyn SessionStore> ⓘ
Trait Implementations§
Source§impl Clone for SessionManager
impl Clone for SessionManager
Source§fn clone(&self) -> SessionManager
fn clone(&self) -> SessionManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for SessionManager
impl !UnwindSafe for SessionManager
impl Freeze for SessionManager
impl Send for SessionManager
impl Sync for SessionManager
impl Unpin for SessionManager
impl UnsafeUnpin 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