pub struct Openers {
pub mime: MimeDb,
pub apps: Apps,
}Expand description
Everything needed to tell which programs open a file, read once and asked many times.
Fields§
§mime: MimeDbWhat kind each file is.
apps: AppsThe programs and the associations between kinds and programs.
Implementations§
Source§impl Openers
impl Openers
Sourcepub fn load(dirs: &XdgDirs, lang: &str, path_var: Option<&OsStr>) -> Self
pub fn load(dirs: &XdgDirs, lang: &str, path_var: Option<&OsStr>) -> Self
Reads the kinds and the programs from the given folders.
lang is the person’s language as in LANG (tr_TR.UTF-8), used for program names;
path_var is the program search path as in PATH, used to drop programs that are not
installed.
Sourcepub fn diagnostics(&self) -> Vec<&Diagnostic>
pub fn diagnostics(&self) -> Vec<&Diagnostic>
Every problem found while reading, the kinds’ files first.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Openers
impl RefUnwindSafe for Openers
impl Send for Openers
impl Sync for Openers
impl Unpin for Openers
impl UnsafeUnpin for Openers
impl UnwindSafe for Openers
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
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> ⓘ
Converts
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> ⓘ
Converts
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