[−][src]Enum icon_loader::ThemeNameProvider
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
Use the '~/.config/kdeglobals' file to determine the theme name.
Use the '~/.config/gtk-3.0/settings.ini' file to determine the theme name.
User(String)
A theme name provided by the user.
A custom function that returns a theme name or an error.
Implementations
impl ThemeNameProvider
[src]
pub fn user(string: impl Into<String>) -> Self
[src]
Creates a new ThemeNameProvider
that provides the given string as theme name.
pub fn custom<F, S, E>(f: F) -> Self where
F: Fn() -> Result<S, E> + Send + Sync + 'static,
S: Into<String>,
E: StdError + Send + Sync + 'static,
[src]
F: Fn() -> Result<S, E> + Send + Sync + 'static,
S: Into<String>,
E: StdError + Send + Sync + 'static,
Creates a new custom ThemeNameProvider
from the given function.
Trait Implementations
impl Debug for ThemeNameProvider
[src]
impl<'_> From<&'_ str> for ThemeNameProvider
[src]
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,
[src]
F: Fn() -> Result<S, E> + Send + Sync + 'static,
S: Into<String>,
E: StdError + Send + Sync + 'static,
impl From<String> for ThemeNameProvider
[src]
impl PartialEq<ThemeNameProvider> for ThemeNameProvider
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,