pub struct PluginKind {
pub app: String,
pub prefix: String,
pub env: String,
pub user_dir: PathBuf,
pub system: bool,
}Expand description
An app’s kind of plugin: how its programs are named and where they are looked for.
Fields§
§app: StringThe app (lumen): names the user’s plugin folder.
prefix: StringProgram names start with this (lumen-ml-).
env: StringThe variable listing more folders (LUMEN_PLUGINS).
user_dir: PathBufWhere the manager installs plugins (the user’s plugin folder by default).
system: boolWhether the running program’s folder and PATH are searched too.
Implementations§
Source§impl PluginKind
impl PluginKind
Sourcepub fn new(app: &str, prefix: &str, env: &str) -> Self
pub fn new(app: &str, prefix: &str, env: &str) -> Self
The plugins of app, named <prefix><name>, with more folders in $<env>.
Sourcepub fn with_user_dir(self, dir: impl Into<PathBuf>) -> Self
pub fn with_user_dir(self, dir: impl Into<PathBuf>) -> Self
Installs into, and looks first in, dir instead of the user’s plugin folder.
Sourcepub fn without_system(self) -> Self
pub fn without_system(self) -> Self
Looks only in $<env> and the user’s plugin folder (not beside the program or on PATH).
Sourcepub fn short_name<'a>(&self, program: &'a str) -> &'a str
pub fn short_name<'a>(&self, program: &'a str) -> &'a str
The plugin’s short name (sam of lumen-ml-sam).
Trait Implementations§
Source§impl Clone for PluginKind
impl Clone for PluginKind
Source§impl Debug for PluginKind
impl Debug for PluginKind
impl Eq for PluginKind
Source§impl PartialEq for PluginKind
impl PartialEq for PluginKind
impl StructuralPartialEq for PluginKind
Auto Trait Implementations§
impl Forget for PluginKind
impl Freeze for PluginKind
impl Move for PluginKind
impl RefUnwindSafe for PluginKind
impl Send for PluginKindwhere
RawVecInner: Send,
impl Sync for PluginKindwhere
RawVecInner: Sync,
impl Unpin for PluginKind
impl UnsafeUnpin for PluginKind
impl UnwindSafe for PluginKindwhere
RawVecInner: UnwindSafe,
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