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 provide 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
sourceimpl Debug for ThemeNameProvider
impl Debug for ThemeNameProvider
sourceimpl From<&'_ str> for ThemeNameProvider
impl From<&'_ str> for ThemeNameProvider
sourceimpl<F, S, E> From<F> for ThemeNameProvider where
F: Fn() -> Result<S, E> + Send + Sync + 'static,
S: Into<String>,
E: StdError + Send + Sync + 'static,
impl<F, S, E> From<F> for ThemeNameProvider where
F: Fn() -> Result<S, E> + Send + Sync + 'static,
S: Into<String>,
E: StdError + Send + Sync + 'static,
sourceimpl From<String> for ThemeNameProvider
impl From<String> 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more