pub struct SelectionStyle {
pub style: Option<Style>,
pub marker: Option<&'static str>,
pub disabled: bool,
}Expand description
Selection styling for list components
Fields§
§style: Option<Style>Style applied to selected item (default: Cyan + Bold)
marker: Option<&'static str>Prefix marker for selected item (default: “> “)
disabled: boolSet to true to disable all component selection styling (user handles it entirely in their Line rendering)
Implementations§
Source§impl SelectionStyle
impl SelectionStyle
Sourcepub fn marker_only(marker: &'static str) -> Self
pub fn marker_only(marker: &'static str) -> Self
Create selection style with only a marker, no style change
Sourcepub fn style_only(style: Style) -> Self
pub fn style_only(style: Style) -> Self
Create selection style with only a style change, no marker
Trait Implementations§
Source§impl Clone for SelectionStyle
impl Clone for SelectionStyle
Source§fn clone(&self) -> SelectionStyle
fn clone(&self) -> SelectionStyle
Returns a duplicate of the value. Read more
1.0.0 · 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 SelectionStyle
impl Debug for SelectionStyle
Auto Trait Implementations§
impl Freeze for SelectionStyle
impl RefUnwindSafe for SelectionStyle
impl Send for SelectionStyle
impl Sync for SelectionStyle
impl Unpin for SelectionStyle
impl UnwindSafe for SelectionStyle
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more