pub enum PickerMode {
Palette,
Hex,
}Expand description
Interaction mode of a ColorPickerState.
Toggle between the two modes with Tab when the picker is focused.
§Example
let mut picker = ColorPickerState::tailwind();
assert_eq!(picker.mode, PickerMode::Palette);Variants§
Palette
Navigate the 2D swatch grid with the arrow keys / hjkl.
Hex
Enter a #RRGGBB or #RGB hex string in the embedded text field.
Trait Implementations§
Source§impl Clone for PickerMode
impl Clone for PickerMode
Source§fn clone(&self) -> PickerMode
fn clone(&self) -> PickerMode
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 PickerMode
impl Debug for PickerMode
Source§impl Default for PickerMode
impl Default for PickerMode
Source§fn default() -> PickerMode
fn default() -> PickerMode
Returns the “default value” for a type. Read more
Source§impl PartialEq for PickerMode
impl PartialEq for PickerMode
Source§fn eq(&self, other: &PickerMode) -> bool
fn eq(&self, other: &PickerMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for PickerMode
impl Eq for PickerMode
impl StructuralPartialEq for PickerMode
Auto Trait Implementations§
impl Freeze for PickerMode
impl RefUnwindSafe for PickerMode
impl Send for PickerMode
impl Sync for PickerMode
impl Unpin for PickerMode
impl UnsafeUnpin for PickerMode
impl UnwindSafe for PickerMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.