pub enum PromptResponseValue {
Text(String),
Confirm(bool),
Selected(Vec<String>),
Form(Vec<(String, String)>),
}Expand description
Typed response value from a user prompt.
Each variant matches a PromptType input kind so the response is
statically typed end-to-end — no serde_json::Value anywhere.
Variants§
Text(String)
Free-text input or a single selected option label.
Confirm(bool)
Yes / No confirmation.
Selected(Vec<String>)
Zero or more selected option labels.
Form(Vec<(String, String)>)
Form field name→value pairs.
Trait Implementations§
Source§impl Clone for PromptResponseValue
impl Clone for PromptResponseValue
Source§fn clone(&self) -> PromptResponseValue
fn clone(&self) -> PromptResponseValue
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 PromptResponseValue
impl Debug for PromptResponseValue
Source§impl<'de> Deserialize<'de> for PromptResponseValue
impl<'de> Deserialize<'de> for PromptResponseValue
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PromptResponseValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PromptResponseValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PromptResponseValue
impl PartialEq for PromptResponseValue
Source§impl Serialize for PromptResponseValue
impl Serialize for PromptResponseValue
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for PromptResponseValue
Auto Trait Implementations§
impl Freeze for PromptResponseValue
impl RefUnwindSafe for PromptResponseValue
impl Send for PromptResponseValue
impl Sync for PromptResponseValue
impl Unpin for PromptResponseValue
impl UnsafeUnpin for PromptResponseValue
impl UnwindSafe for PromptResponseValue
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