pub enum ElicitContentValue {
Null,
Bool(bool),
Int(JsonInteger),
Float(f64),
String(String),
StringArray(Vec<String>),
}Expand description
Content type for elicitation responses.
Values can be strings, integers, floats, booleans, arrays of strings, or null.
Deserialize is manual: a derived untagged decode buffers the input into
serde’s Content, where an arbitrary-precision JSON number surfaces as a
magic map that neither JsonInteger nor f64 variant probing could
previously classify.
Variants§
Null
Null value.
Bool(bool)
Boolean value.
Int(JsonInteger)
Arbitrary-width JSON integer value.
Float(f64)
Float value.
String(String)
String value.
StringArray(Vec<String>)
Array of strings (for multi-select).
Trait Implementations§
Source§impl Clone for ElicitContentValue
impl Clone for ElicitContentValue
Source§fn clone(&self) -> ElicitContentValue
fn clone(&self) -> ElicitContentValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ElicitContentValue
impl Debug for ElicitContentValue
Source§impl<'de> Deserialize<'de> for ElicitContentValue
impl<'de> Deserialize<'de> for ElicitContentValue
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 From<&str> for ElicitContentValue
impl From<&str> for ElicitContentValue
Source§impl From<JsonInteger> for ElicitContentValue
impl From<JsonInteger> for ElicitContentValue
Source§fn from(v: JsonInteger) -> Self
fn from(v: JsonInteger) -> Self
Converts to this type from the input type.
Source§impl<T: Into<ElicitContentValue>> From<Option<T>> for ElicitContentValue
impl<T: Into<ElicitContentValue>> From<Option<T>> for ElicitContentValue
Source§impl From<String> for ElicitContentValue
impl From<String> for ElicitContentValue
Source§impl From<bool> for ElicitContentValue
impl From<bool> for ElicitContentValue
Source§impl From<f64> for ElicitContentValue
impl From<f64> for ElicitContentValue
Source§impl From<i64> for ElicitContentValue
impl From<i64> for ElicitContentValue
Source§impl PartialEq for ElicitContentValue
impl PartialEq for ElicitContentValue
Source§impl Serialize for ElicitContentValue
impl Serialize for ElicitContentValue
impl StructuralPartialEq for ElicitContentValue
Auto Trait Implementations§
impl Freeze for ElicitContentValue
impl RefUnwindSafe for ElicitContentValue
impl Send for ElicitContentValue
impl Sync for ElicitContentValue
impl Unpin for ElicitContentValue
impl UnsafeUnpin for ElicitContentValue
impl UnwindSafe for ElicitContentValue
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).