pub enum Control {
Continuous,
Toggle,
Choice(&'static [&'static str]),
Bands {
names: &'static [&'static str],
width: u16,
},
}Expand description
The widget a field wants.
Variants§
Continuous
A numeric range: a dial or slider.
Toggle
Off / On, for a two-value field.
Choice(&'static [&'static str])
Named values: names[raw - min]. Raw values past the end show as
Driver::format_value formats them.
Bands
Named bands of raw values: name i covers raw i * width up to
the next band; the last band extends to the field’s max. To pick
band i, set i * width + width / 2.
Trait Implementations§
impl Copy for Control
impl Eq for Control
impl StructuralPartialEq for Control
Auto Trait Implementations§
impl Freeze for Control
impl RefUnwindSafe for Control
impl Send for Control
impl Sync for Control
impl Unpin for Control
impl UnsafeUnpin for Control
impl UnwindSafe for Control
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