Skip to main content

DynCompletionHandler

Trait DynCompletionHandler 

Source
pub trait DynCompletionHandler: Send + Sync {
    // Required method
    fn complete<'a>(
        &'a self,
        request: &'a CompleteRequest,
        ctx: &'a Context<'_>,
    ) -> Pin<Box<dyn Future<Output = Result<CompleteResult, McpError>> + Send + 'a>>;
}
Expand description

Object-safe form of CompletionHandler.

Required Methods§

Source

fn complete<'a>( &'a self, request: &'a CompleteRequest, ctx: &'a Context<'_>, ) -> Pin<Box<dyn Future<Output = Result<CompleteResult, McpError>> + Send + 'a>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§