Enum icon_loader::ThemeNameProvider
source · 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 ThemeNameProviderwhere
F: Fn() -> Result<S, E> + Send + Sync + 'static,
S: Into<String>,
E: StdError + Send + Sync + 'static,
impl<F, S, E> From<F> for ThemeNameProviderwhere F: Fn() -> Result<S, E> + Send + Sync + 'static, S: Into<String>, E: StdError + Send + Sync + 'static,
source§impl From<String> for ThemeNameProvider
impl From<String> for ThemeNameProvider
source§impl PartialEq<ThemeNameProvider> for ThemeNameProvider
impl PartialEq<ThemeNameProvider> for ThemeNameProvider
Auto Trait Implementations§
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