pub trait McpElicitationHandler: Send + Sync {
// Required method
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ElicitationRequest,
) -> Pin<Box<dyn Future<Output = ElicitationResponse> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
Handles a server-initiated elicitation/create request — the
tools.question surface’s PROTOCOL side (§2.1 dep). The real
interactive prompt UI is tui’s job (P5 item #4, not yet built);
pending that, HeadlessElicitationHandler is the honest default —
DENY (decline), matching module 6’s own “headless print mode:
deny-default like OC” row rather than hanging the tool call or silently
fabricating an answer. An embedder (or a future tui integration) can
install a real interactive handler via
McpClient::set_elicitation_handler.
Required Methods§
Sourcefn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ElicitationRequest,
) -> Pin<Box<dyn Future<Output = ElicitationResponse> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ElicitationRequest,
) -> Pin<Box<dyn Future<Output = ElicitationResponse> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Decide how to respond to one elicitation request.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".