Skip to main content

PluginHandler

Trait PluginHandler 

Source
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§

Source

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,

Source

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,

Source

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§

Source

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".

Implementors§