pub enum Control<S: Scalar> {
Heading {
text: String,
},
Text {
text: String,
tone: Tone,
},
Actions {
actions: Vec<Action>,
},
Checkbox {
label: String,
value: bool,
},
Number(Number<S>),
Select {
label: String,
value: String,
options: Vec<Choice>,
},
Reference(Reference),
List {
items: Vec<ListItem>,
empty: String,
},
}Expand description
A dialog primitive.
Variants§
Heading
Text
Actions
Things to do or choose, as buttons: pressing one sends its value as
super::Value::Choice. Grouped ones are shown under their group.
Checkbox
Number(Number<S>)
Select
One of options, by value.
Reference(Reference)
List
Trait Implementations§
Source§impl<S: PartialEq + Scalar> PartialEq for Control<S>
impl<S: PartialEq + Scalar> PartialEq for Control<S>
impl<S: PartialEq + Scalar> StructuralPartialEq for Control<S>
Auto Trait Implementations§
impl<S> Freeze for Control<S>where
S: Freeze,
impl<S> RefUnwindSafe for Control<S>where
S: RefUnwindSafe,
impl<S> Send for Control<S>
impl<S> Sync for Control<S>
impl<S> Unpin for Control<S>where
S: Unpin,
impl<S> UnsafeUnpin for Control<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for Control<S>where
S: UnwindSafe,
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