pub trait UserInputHandler:
Send
+ Sync
+ 'static {
// Required method
fn handle<'life0, 'async_trait>(
&'life0 self,
session_id: SessionId,
question: String,
choices: Option<Vec<String>>,
allow_freeform: Option<bool>,
) -> Pin<Box<dyn Future<Output = Option<UserInputResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Handler for user_input.requested events from the legacy question-and-answer
ask_user variant.
When unset, requestUserInput: false goes on the wire, so this client
cannot handle legacy user-input requests.
Required Methods§
Sourcefn handle<'life0, 'async_trait>(
&'life0 self,
session_id: SessionId,
question: String,
choices: Option<Vec<String>>,
allow_freeform: Option<bool>,
) -> Pin<Box<dyn Future<Output = Option<UserInputResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle<'life0, 'async_trait>(
&'life0 self,
session_id: SessionId,
question: String,
choices: Option<Vec<String>>,
allow_freeform: Option<bool>,
) -> Pin<Box<dyn Future<Output = Option<UserInputResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Answer a question on behalf of the user. Return None to signal
“no answer available”.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".