pub struct AskUserOption {
pub value: String,
pub label: String,
pub description: Option<String>,
pub selected: bool,
}Expand description
A predefined answer option for a question.
The value field defaults to label when omitted by the LLM, since models
frequently treat them as interchangeable. A custom Deserialize impl
handles this fallback transparently.
Fields§
§value: String§label: String§description: Option<String>Optional description shown below the label.
selected: boolDefault selection state for multi_select questions. Ignored for single-select.
Trait Implementations§
Source§impl Clone for AskUserOption
impl Clone for AskUserOption
Source§fn clone(&self) -> AskUserOption
fn clone(&self) -> AskUserOption
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 AskUserOption
impl Debug for AskUserOption
Source§impl<'de> Deserialize<'de> for AskUserOption
impl<'de> Deserialize<'de> for AskUserOption
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
Source§impl JsonSchema for AskUserOption
impl JsonSchema for AskUserOption
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for AskUserOption
impl PartialEq for AskUserOption
Source§impl Serialize for AskUserOption
impl Serialize for AskUserOption
impl StructuralPartialEq for AskUserOption
Auto Trait Implementations§
impl Freeze for AskUserOption
impl RefUnwindSafe for AskUserOption
impl Send for AskUserOption
impl Sync for AskUserOption
impl Unpin for AskUserOption
impl UnsafeUnpin for AskUserOption
impl UnwindSafe for AskUserOption
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