pub struct AssetDirs {
pub themes: Option<PathBuf>,
pub theme_sources: Vec<(String, String)>,
pub icons: Option<PathBuf>,
pub icon_sources: Vec<(String, String)>,
pub locales: Option<PathBuf>,
pub locale_sources: Vec<(String, String)>,
pub keymap: Option<PathBuf>,
pub keymap_source: Option<(String, String)>,
}Expand description
Where an application’s own theme, icon, locale and keymap files live.
Every kind of file can be given as text instead of as a path, for files compiled into the
binary with include_str!. An application that gives all of its files as text starts with
nothing beside it on disk, and a path it also names is then optional: when the path cannot be
read the text stands in for it and the reason becomes a diagnostic
instead of stopping the program.
Fields§
§themes: Option<PathBuf>Directory of *.toml theme files.
theme_sources: Vec<(String, String)>Theme files given as text, as (file name, TOML text), loaded after themes so they
win. The file stem is the theme id, as it is in a directory.
icons: Option<PathBuf>Directory of *.toml icon set files.
icon_sources: Vec<(String, String)>Icon set files given as text, as (file name, TOML text), loaded after icons so they
win. The file stem is the icon set id, as it is in a directory.
locales: Option<PathBuf>Directory of *.toml locale files.
locale_sources: Vec<(String, String)>Locale files given as text, as (file name, TOML text), loaded after locales so they
win. For files compiled into the binary with include_str!, which an installed program
carries with it; the file name only labels diagnostics.
keymap: Option<PathBuf>A keymap file layered over the built-in keymap.
keymap_source: Option<(String, String)>A keymap given as text, as (file name, TOML text), layered over the built-in keymap and
over keymap, so it wins. The file name only labels diagnostics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AssetDirs
impl RefUnwindSafe for AssetDirs
impl Send for AssetDirs
impl Sync for AssetDirs
impl Unpin for AssetDirs
impl UnsafeUnpin for AssetDirs
impl UnwindSafe for AssetDirs
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more