nu_plugin_engine

Trait GetPlugin

Source
pub trait GetPlugin: RegisteredPlugin {
    // Required method
    fn get_plugin(
        self: Arc<Self>,
        context: Option<(&EngineState, &mut Stack)>,
    ) -> Result<PluginInterface, ShellError>;
}
Expand description

Anything that can produce a plugin interface.

Required Methods§

Source

fn get_plugin( self: Arc<Self>, context: Option<(&EngineState, &mut Stack)>, ) -> Result<PluginInterface, ShellError>

Retrieve or spawn a [PluginInterface]. The context may be used for determining environment variables to launch the plugin with.

Implementors§