pub fn install_plugin_dir(
dir: &Path,
) -> Result<&'static PluginDirReport, InstallError>Expand description
Install a plugin directory as the one this process loads from, and build the registry now.
This is the call a host makes when it has a directory from its own
configuration โ a command-line flag, say โ and wants failures reported
rather than logged. It must come before the first call to
process_registry or to any by-name resolver, directly or indirectly.
Offering the same directory twice is fine and returns the same report.
ยงErrors
InstallError::Unreadable when dir cannot be read;
InstallError::AlreadyBuilt when the registry already exists and was not
built from this same directory. Individual libraries that fail to load are
not errors here โ they are entries in the returned report, because a host
decides whether a broken plugin is fatal.