pub struct ModuleEnvironment { /* private fields */ }Expand description
One mounted module: a command library under the mount’s alias.
Implementations§
Source§impl ModuleEnvironment
impl ModuleEnvironment
Sourcepub fn mount(alias: &str, target: &str) -> Result<ModuleEnvironment, String>
pub fn mount(alias: &str, target: &str) -> Result<ModuleEnvironment, String>
Mount target under alias: a module file (./helpers.py,
imported from its path) or an import path (pkg.helpers,
imported from the Python path, the active virtualenv’s
included). Err names what did not import, the module’s own
error in it.
Trait Implementations§
Source§impl CommandLibrary for ModuleEnvironment
impl CommandLibrary for ModuleEnvironment
Source§fn resolve(&self, name: &str) -> Result<&Synopsis, String>
fn resolve(&self, name: &str) -> Result<&Synopsis, String>
The synopsis of
name for the gate and the call: the
declared one, or, in a library that reflects the package it
wraps, the one read from that package’s own signature. Err
is the refusal when there is none: the declared commands by
default, what the package has in a reflective library.Source§fn requirements(&self) -> &[&str]
fn requirements(&self) -> &[&str]
The run-time requirements the library declares beyond its
own code (a Python package and its dictionaries), as the
recipes’ requirements line names them.
Auto Trait Implementations§
impl !Freeze for ModuleEnvironment
impl Forget for ModuleEnvironment
impl RefUnwindSafe for ModuleEnvironment
impl Send for ModuleEnvironment
impl Sync for ModuleEnvironment
impl Unpin for ModuleEnvironment
impl UnsafeUnpin for ModuleEnvironment
impl UnwindSafe for ModuleEnvironment
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