pub struct FileExtLoader {
pub plugins: JoinSet<Result<(Vec<String>, RuntimeFileExt)>>,
}Expand description
Use this struct to load and store the plugins.
Fields§
§plugins: JoinSet<Result<(Vec<String>, RuntimeFileExt)>>Implementations§
Source§impl FileExtLoader
impl FileExtLoader
Sourcepub fn load_statically_linked_plugin<T: FileExtPlugin + 'static>(&mut self)
pub fn load_statically_linked_plugin<T: FileExtPlugin + 'static>(&mut self)
Load a statically linked plugin by calling the new method of the plugin. This function
is not async, so it will not await for the plugin to be loaded. It will spawn a new
task to load the plugin and return immediately.
Before using any loaded plugin, the FileExtLoader::finish method must be called to
await for all the plugins to be loaded and return them.
Sourcepub fn load_dynamically_linked_plugin(&mut self, path: PathBuf)
pub fn load_dynamically_linked_plugin(&mut self, path: PathBuf)
Load a dynamically linked plugin by calling the new method of the plugin. This function
is not async, so it will not await for the plugin to be loaded. It will spawn a new
task to load the plugin and return immediately.
Before using any loaded plugin, the FileExtLoader::finish method must be called to
await for all the plugins to be loaded and return them.