pub trait PluginHandler: Send + Sync {
// Required methods
fn initialize<'life0, 'async_trait>(
&'life0 self,
req: InitializeRequest,
) -> Pin<Box<dyn Future<Output = Result<InitializeResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_models<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ListModelsResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn complete<'life0, 'async_trait>(
&'life0 self,
req: CompleteRequest,
) -> Pin<Box<dyn Future<Output = Result<CompleteResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Required Methods§
fn initialize<'life0, 'async_trait>(
&'life0 self,
req: InitializeRequest,
) -> Pin<Box<dyn Future<Output = Result<InitializeResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_models<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ListModelsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete<'life0, 'async_trait>(
&'life0 self,
req: CompleteRequest,
) -> Pin<Box<dyn Future<Output = Result<CompleteResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".