pub struct ThemeSelectorState { /* private fields */ }Implementations§
Source§impl ThemeSelectorState
impl ThemeSelectorState
pub fn new(items: Vec<(String, Theme)>) -> Self
Sourcepub fn select_theme(&mut self, theme: &Theme)
pub fn select_theme(&mut self, theme: &Theme)
Highlights the entry matching theme, leaving the selection unchanged
when none matches.
pub fn selected_theme(&self) -> Option<Theme>
pub fn selected_name(&self) -> Option<&str>
pub fn next(&mut self)
pub fn previous(&mut self)
Trait Implementations§
Source§impl Clone for ThemeSelectorState
impl Clone for ThemeSelectorState
Source§fn clone(&self) -> ThemeSelectorState
fn clone(&self) -> ThemeSelectorState
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 ThemeSelectorState
impl Debug for ThemeSelectorState
Source§impl Default for ThemeSelectorState
impl Default for ThemeSelectorState
Source§fn default() -> ThemeSelectorState
fn default() -> ThemeSelectorState
Returns the “default value” for a type. Read more
Source§impl PartialEq for ThemeSelectorState
impl PartialEq for ThemeSelectorState
impl StructuralPartialEq for ThemeSelectorState
Auto Trait Implementations§
impl Freeze for ThemeSelectorState
impl RefUnwindSafe for ThemeSelectorState
impl Send for ThemeSelectorState
impl Sync for ThemeSelectorState
impl Unpin for ThemeSelectorState
impl UnsafeUnpin for ThemeSelectorState
impl UnwindSafe for ThemeSelectorState
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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