pub enum ClusterKind {
CheckBoxes,
RadioButtons,
MultiCheckBoxes {
sel_range: u8,
flags: u16,
states: String,
},
}Expand description
Selects which of the three cluster behaviors the Cluster engine applies.
Pass a ClusterKind to Cluster::new when you need the raw engine.
In practice, call the named constructors instead:
CheckBoxes::new → ClusterKind::CheckBoxes,
RadioButtons::new → ClusterKind::RadioButtons,
MultiCheckBoxes::new → ClusterKind::MultiCheckBoxes.
Variants§
CheckBoxes
Check boxes — value is a bitmask (bit item set ⇔ item checked).
Box [ ], markers " X" (idx 0 / 1).
RadioButtons
Radio buttons — value is the selected item index. Box ( ), markers
" •" (idx 0 / 1; CP437 0x07 bullet → U+2022). Moving the selection sets
value = item.
MultiCheckBoxes
Multi-state check boxes — value packs an n-bit state per item. Box
[ ], markers from states (idx = the item’s current state).
Use this variant (or MultiCheckBoxes::new) when each option can be
in one of three or more named states. The three fields together determine
how many bits each item occupies in value and how those bits are drawn.
Fields
sel_range: u8Number of distinct states each item cycles through (must be ≤ the
number of characters in states). Press / click / hotkey advances
an item’s state by 1, wrapping back to 0 after sel_range - 1.
Trait Implementations§
Source§impl Clone for ClusterKind
impl Clone for ClusterKind
Source§fn clone(&self) -> ClusterKind
fn clone(&self) -> ClusterKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClusterKind
impl Debug for ClusterKind
impl Eq for ClusterKind
Source§impl PartialEq for ClusterKind
impl PartialEq for ClusterKind
impl StructuralPartialEq for ClusterKind
Auto Trait Implementations§
impl Freeze for ClusterKind
impl RefUnwindSafe for ClusterKind
impl Send for ClusterKind
impl Sync for ClusterKind
impl Unpin for ClusterKind
impl UnsafeUnpin for ClusterKind
impl UnwindSafe for ClusterKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.