ElicitationHandler

Trait ElicitationHandler 

Source
pub trait ElicitationHandler: Send + Sync {
    // Required methods
    fn handle_elicitation<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: &'life1 ElicitationContext,
    ) -> Pin<Box<dyn Future<Output = Result<ElicitationResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn can_handle(&self, context: &ElicitationContext) -> bool;

    // Provided method
    fn priority(&self) -> i32 { ... }
}
Expand description

Handler for server-initiated elicitation requests

Required Methods§

Source

fn handle_elicitation<'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 ElicitationContext, ) -> Pin<Box<dyn Future<Output = Result<ElicitationResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle an elicitation request from the server

Source

fn can_handle(&self, context: &ElicitationContext) -> bool

Check if this handler can process the given elicitation

Provided Methods§

Source

fn priority(&self) -> i32

Get handler priority (higher = higher priority)

Implementors§