Skip to main content

resolve_plugin

Function resolve_plugin 

Source
pub fn resolve_plugin<'a>(
    name: &str,
    force_python: bool,
    pass: PluginPass,
    registry: &'a NativePluginRegistry,
    base_dir: &Path,
    path_security: bool,
) -> Result<ResolvedPlugin<'a>, PluginResolveError>
Expand description

Classify a plugin invocation into a runnable ResolvedPlugin.

Native plugins resolve through the typed registry keyed on pass; everything else is classified by extension/shape. The Python file-vs-module test is the single-sourced [crate::python::is_python_plugin_file_ref] criterion.

§Errors

Returns a PluginResolveError when the reference can’t run: a path-security violation, a bare module name (#1432), an unknown name, or a runtime whose feature is disabled.