pub trait Agent {
// Required methods
fn initialize(
&self,
arguments: InitializeRequest,
) -> impl Future<Output = Result<InitializeResponse, Error>>;
fn authenticate(
&self,
arguments: AuthenticateRequest,
) -> impl Future<Output = Result<(), Error>>;
fn new_session(
&self,
arguments: NewSessionRequest,
) -> impl Future<Output = Result<NewSessionResponse, Error>>;
fn load_session(
&self,
arguments: LoadSessionRequest,
) -> impl Future<Output = Result<(), Error>>;
fn prompt(
&self,
arguments: PromptRequest,
) -> impl Future<Output = Result<PromptResponse, Error>>;
fn cancel(
&self,
args: CancelNotification,
) -> impl Future<Output = Result<(), Error>>;
}
Required Methods§
fn initialize( &self, arguments: InitializeRequest, ) -> impl Future<Output = Result<InitializeResponse, Error>>
fn authenticate( &self, arguments: AuthenticateRequest, ) -> impl Future<Output = Result<(), Error>>
fn new_session( &self, arguments: NewSessionRequest, ) -> impl Future<Output = Result<NewSessionResponse, Error>>
fn load_session( &self, arguments: LoadSessionRequest, ) -> impl Future<Output = Result<(), Error>>
fn prompt( &self, arguments: PromptRequest, ) -> impl Future<Output = Result<PromptResponse, Error>>
fn cancel( &self, args: CancelNotification, ) -> impl Future<Output = Result<(), Error>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.