pub enum ThemeNameProvider {
KDE,
GTK,
User(String),
Custom(Box<dyn Fn() -> Result<String, Box<dyn StdError + Send + Sync>> + Send + Sync>),
}
Expand description
Enum that provides a theme name to IconLoader
.
It can either load the system theme name from the KDE or GTK config files
or provide a fixed string or a theme name yielded by a completely customizable function.
The last option allows users to load their own config files for example.
Variants§
KDE
Use the ‘~/.config/kdeglobals’ file to determine the theme name.
GTK
Use the ‘~/.config/gtk-3.0/settings.ini’ file to determine the theme name.
User(String)
A theme name provided by the user.
Custom(Box<dyn Fn() -> Result<String, Box<dyn StdError + Send + Sync>> + Send + Sync>)
A custom function that returns a theme name or an error.
Implementations§
Trait Implementations§
Source§impl Debug for ThemeNameProvider
impl Debug for ThemeNameProvider
Source§impl Default for ThemeNameProvider
impl Default for ThemeNameProvider
Source§impl From<&str> for ThemeNameProvider
impl From<&str> for ThemeNameProvider
Source§impl<F, S, E> From<F> for ThemeNameProvider
impl<F, S, E> From<F> for ThemeNameProvider
Source§impl From<String> for ThemeNameProvider
impl From<String> for ThemeNameProvider
Source§impl PartialEq for ThemeNameProvider
impl PartialEq for ThemeNameProvider
Auto Trait Implementations§
impl Freeze for ThemeNameProvider
impl !RefUnwindSafe for ThemeNameProvider
impl Send for ThemeNameProvider
impl Sync for ThemeNameProvider
impl Unpin for ThemeNameProvider
impl !UnwindSafe for ThemeNameProvider
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