pub struct Choice {
pub value: String,
pub label: String,
pub detail: String,
}Expand description
One option from a live source.
The owned twin of AddonChoice, and it has to be owned: a roster is
people who happen to be in a call right now, so there is nothing to borrow
from and nothing 'static to point at.
Fields§
§value: StringWhat gets stored in the binding.
An identity, not a name. Whatever survives the label changing — a rename, a nickname, a rejoin — because this is what the binding still holds next week.
label: StringWhat the user reads while choosing.
detail: StringA second line, where the label alone is ambiguous.
Two people called Alex in one call is ordinary, and the identity underneath is a number nobody recognises. Empty when there is nothing to add, which is the common case.
Implementations§
Trait Implementations§
impl Eq for Choice
impl StructuralPartialEq for Choice
Auto Trait Implementations§
impl Freeze for Choice
impl RefUnwindSafe for Choice
impl Send for Choice
impl Sync for Choice
impl Unpin for Choice
impl UnsafeUnpin for Choice
impl UnwindSafe for Choice
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