pub struct ChoiceItem {
pub value: String,
pub label: String,
}Expand description
One selectable item of a OptionKind::Choice or
OptionKind::MultiChoice (spec §3.2.1).
value is what goes into the options object and is opaque here; label
is display text. Both are engine-authored.
Fields§
§value: StringOpaque value stored in the options object.
label: StringHuman-facing label for this item.
Trait Implementations§
Source§impl Clone for ChoiceItem
impl Clone for ChoiceItem
Source§fn clone(&self) -> ChoiceItem
fn clone(&self) -> ChoiceItem
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 ChoiceItem
impl Debug for ChoiceItem
Source§impl<'de> Deserialize<'de> for ChoiceItem
impl<'de> Deserialize<'de> for ChoiceItem
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
impl Eq for ChoiceItem
Source§impl PartialEq for ChoiceItem
impl PartialEq for ChoiceItem
Source§impl Serialize for ChoiceItem
impl Serialize for ChoiceItem
impl StructuralPartialEq for ChoiceItem
Auto Trait Implementations§
impl Freeze for ChoiceItem
impl RefUnwindSafe for ChoiceItem
impl Send for ChoiceItem
impl Sync for ChoiceItem
impl Unpin for ChoiceItem
impl UnsafeUnpin for ChoiceItem
impl UnwindSafe for ChoiceItem
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