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

Creates a new ThemeNameProvider that provides the given string as theme name.

Creates a new custom ThemeNameProvider from the given function.

Trait Implementations

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.