pub enum PluginSource {
Disk {
base_dir: PathBuf,
},
Embedded {
filter_lf: &'static str,
},
}Expand description
Where a plugin’s filter.lf lives. Disk-backed plugins are user-installed
under ~/.lowfat/plugins/; embedded plugins are baked into the binary at
compile time (see crate::embedded).
Variants§
Implementations§
Source§impl PluginSource
impl PluginSource
Sourcepub fn display_path(&self, category: &str, name: &str) -> PathBuf
pub fn display_path(&self, category: &str, name: &str) -> PathBuf
Path to use for resolving relative paths, logs, etc. Embedded plugins
get a synthetic <embedded>/<category>/<name> placeholder so callers
that just want to print a location have something readable.
pub fn is_embedded(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginSource
impl RefUnwindSafe for PluginSource
impl Send for PluginSource
impl Sync for PluginSource
impl Unpin for PluginSource
impl UnsafeUnpin for PluginSource
impl UnwindSafe for PluginSource
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