pub struct QuestionRequest {
pub question: String,
pub header: Option<String>,
pub options: Vec<QuestionOption>,
pub multi_select: bool,
}Expand description
Request for user to answer a question from the agent.
Fields§
§question: StringThe question text to display.
header: Option<String>Optional header/category for the question.
options: Vec<QuestionOption>Available options (if multiple choice). Empty means free-form text input.
multi_select: boolWhether multiple options can be selected.
Implementations§
Source§impl QuestionRequest
impl QuestionRequest
Sourcepub fn with_options(
question: impl Into<String>,
options: Vec<QuestionOption>,
) -> Self
pub fn with_options( question: impl Into<String>, options: Vec<QuestionOption>, ) -> Self
Creates a new multiple-choice question request.
Sourcepub fn with_header(self, header: impl Into<String>) -> Self
pub fn with_header(self, header: impl Into<String>) -> Self
Adds a header to the question.
Sourcepub const fn with_multi_select(self) -> Self
pub const fn with_multi_select(self) -> Self
Enables multi-select mode.
Trait Implementations§
Source§impl Clone for QuestionRequest
impl Clone for QuestionRequest
Source§fn clone(&self) -> QuestionRequest
fn clone(&self) -> QuestionRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QuestionRequest
impl Debug for QuestionRequest
Source§impl<'de> Deserialize<'de> for QuestionRequest
impl<'de> Deserialize<'de> for QuestionRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QuestionRequest
impl RefUnwindSafe for QuestionRequest
impl Send for QuestionRequest
impl Sync for QuestionRequest
impl Unpin for QuestionRequest
impl UnwindSafe for QuestionRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more