pub struct ChoiceDecl {
pub value: String,
pub label: String,
pub detail: String,
}Expand description
One option, owned. Mirrors AddonChoice.
Fields§
§value: StringWhat gets stored.
label: StringWhat the user reads.
detail: StringA second line, where the label alone is ambiguous.
Defaulted, so this stayed additive. An addon built against an earlier SDK sends no such field and an older daemon ignores it, which is what an API that is a promise to strangers has to manage.
Exists because display names are not unique: two people called Alex in one call is ordinary, and the identity underneath is a number nobody recognises. A binding attached to the wrong Alex works perfectly and passes every test.
Trait Implementations§
Source§impl Clone for ChoiceDecl
impl Clone for ChoiceDecl
Source§fn clone(&self) -> ChoiceDecl
fn clone(&self) -> ChoiceDecl
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 ChoiceDecl
impl Debug for ChoiceDecl
Source§impl<'de> Deserialize<'de> for ChoiceDecl
impl<'de> Deserialize<'de> for ChoiceDecl
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 PartialEq for ChoiceDecl
impl PartialEq for ChoiceDecl
Source§fn eq(&self, other: &ChoiceDecl) -> bool
fn eq(&self, other: &ChoiceDecl) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ChoiceDecl
impl Serialize for ChoiceDecl
impl Eq for ChoiceDecl
impl StructuralPartialEq for ChoiceDecl
Auto Trait Implementations§
impl Freeze for ChoiceDecl
impl RefUnwindSafe for ChoiceDecl
impl Send for ChoiceDecl
impl Sync for ChoiceDecl
impl Unpin for ChoiceDecl
impl UnsafeUnpin for ChoiceDecl
impl UnwindSafe for ChoiceDecl
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