pub struct SessionManager { /* private fields */ }Expand description
Manages ACP sessions, each session has its own agent and state
Implementations§
Source§impl SessionManager
impl SessionManager
pub fn new(actor_handle: AcpActorHandle) -> Self
Trait Implementations§
Source§impl Agent for SessionManager
impl Agent for SessionManager
Source§fn initialize<'life0, 'async_trait>(
&'life0 self,
args: InitializeRequest,
) -> Pin<Box<dyn Future<Output = Result<InitializeResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 self,
args: InitializeRequest,
) -> Pin<Box<dyn Future<Output = Result<InitializeResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Establishes the connection with a client and negotiates protocol capabilities. Read more
Source§fn authenticate<'life0, 'async_trait>(
&'life0 self,
args: AuthenticateRequest,
) -> Pin<Box<dyn Future<Output = Result<AuthenticateResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn authenticate<'life0, 'async_trait>(
&'life0 self,
args: AuthenticateRequest,
) -> Pin<Box<dyn Future<Output = Result<AuthenticateResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Authenticates the client using the specified authentication method. Read more
Source§fn new_session<'life0, 'async_trait>(
&'life0 self,
args: NewSessionRequest,
) -> Pin<Box<dyn Future<Output = Result<NewSessionResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn new_session<'life0, 'async_trait>(
&'life0 self,
args: NewSessionRequest,
) -> Pin<Box<dyn Future<Output = Result<NewSessionResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates a new conversation session with the agent. Read more
Source§fn list_sessions<'life0, 'async_trait>(
&'life0 self,
args: ListSessionsRequest,
) -> Pin<Box<dyn Future<Output = Result<ListSessionsResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_sessions<'life0, 'async_trait>(
&'life0 self,
args: ListSessionsRequest,
) -> Pin<Box<dyn Future<Output = Result<ListSessionsResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
UNSTABLE Read more
Source§fn load_session<'life0, 'async_trait>(
&'life0 self,
args: LoadSessionRequest,
) -> Pin<Box<dyn Future<Output = Result<LoadSessionResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_session<'life0, 'async_trait>(
&'life0 self,
args: LoadSessionRequest,
) -> Pin<Box<dyn Future<Output = Result<LoadSessionResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads an existing session to resume a previous conversation. Read more
Source§fn prompt<'life0, 'async_trait>(
&'life0 self,
args: PromptRequest,
) -> Pin<Box<dyn Future<Output = Result<PromptResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prompt<'life0, 'async_trait>(
&'life0 self,
args: PromptRequest,
) -> Pin<Box<dyn Future<Output = Result<PromptResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Processes a user prompt within a session. Read more
Source§fn cancel<'life0, 'async_trait>(
&'life0 self,
args: CancelNotification,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel<'life0, 'async_trait>(
&'life0 self,
args: CancelNotification,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Cancels ongoing operations for a session. Read more
Source§fn set_session_config_option<'life0, 'async_trait>(
&'life0 self,
args: SetSessionConfigOptionRequest,
) -> Pin<Box<dyn Future<Output = Result<SetSessionConfigOptionResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_session_config_option<'life0, 'async_trait>(
&'life0 self,
args: SetSessionConfigOptionRequest,
) -> Pin<Box<dyn Future<Output = Result<SetSessionConfigOptionResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sets the current value for a session configuration option. Read more
Source§fn set_session_mode<'life0, 'async_trait>(
&'life0 self,
args: SetSessionModeRequest,
) -> Pin<Box<dyn Future<Output = Result<SetSessionModeResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_session_mode<'life0, 'async_trait>(
&'life0 self,
args: SetSessionModeRequest,
) -> Pin<Box<dyn Future<Output = Result<SetSessionModeResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sets the current mode for a session. Read more
Source§fn ext_method<'life0, 'async_trait>(
&'life0 self,
args: ExtRequest,
) -> Pin<Box<dyn Future<Output = Result<ExtResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ext_method<'life0, 'async_trait>(
&'life0 self,
args: ExtRequest,
) -> Pin<Box<dyn Future<Output = Result<ExtResponse, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handles extension method requests from the client. Read more
Auto Trait Implementations§
impl Freeze for SessionManager
impl !RefUnwindSafe for SessionManager
impl Send for SessionManager
impl Sync for SessionManager
impl Unpin for SessionManager
impl UnsafeUnpin 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 moreSource§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
fn into_option(self) -> Option<T>
Creates a shared type from an unshared type.