pub enum HighlightSpacing {
Always,
WhenSelected,
Never,
}Expand description
Whether List’s highlight_symbol marker
column reserves width even when ListState::selected is
None.
HighlightSpacing::WhenSelected is the default: with nothing selected, the list renders no
marker column at all, and one only appears (shifting every item’s text right by the
symbol’s width) the moment something becomes selected. HighlightSpacing::Always reserves
the column unconditionally, so item text never shifts as selection comes and goes.
HighlightSpacing::Never never reserves it, so the symbol never renders even while
something is selected.
Variants§
Always
Always reserve the marker column’s width, whether or not anything is selected.
WhenSelected
Reserve the marker column’s width only while
ListState::selected is Some.
Never
Never reserve the marker column’s width; the highlight symbol never renders.
Trait Implementations§
Source§impl Clone for HighlightSpacing
impl Clone for HighlightSpacing
Source§fn clone(&self) -> HighlightSpacing
fn clone(&self) -> HighlightSpacing
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 HighlightSpacing
impl Debug for HighlightSpacing
Source§impl Default for HighlightSpacing
impl Default for HighlightSpacing
Source§fn default() -> HighlightSpacing
fn default() -> HighlightSpacing
Source§impl Hash for HighlightSpacing
impl Hash for HighlightSpacing
Source§impl PartialEq for HighlightSpacing
impl PartialEq for HighlightSpacing
Source§fn eq(&self, other: &HighlightSpacing) -> bool
fn eq(&self, other: &HighlightSpacing) -> bool
self and other values to be equal, and is used by ==.impl Copy for HighlightSpacing
impl Eq for HighlightSpacing
impl StructuralPartialEq for HighlightSpacing
Auto Trait Implementations§
impl Freeze for HighlightSpacing
impl RefUnwindSafe for HighlightSpacing
impl Send for HighlightSpacing
impl Sync for HighlightSpacing
impl Unpin for HighlightSpacing
impl UnsafeUnpin for HighlightSpacing
impl UnwindSafe for HighlightSpacing
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<C> WithAlpha for Cwhere
C: Copy,
impl<C> WithAlpha for Cwhere
C: Copy,
§fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
self with alpha, storing alpha before the color in memory
(see [AlphaFirst]).§fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
self with alpha, storing alpha after the color in memory
(see [AlphaLast]).