pub struct PluginRegistry { /* private fields */ }Expand description
Plugin registry for managing loaded plugins
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
Sourcepub fn add_search_path<P: AsRef<Path>>(&mut self, path: P)
pub fn add_search_path<P: AsRef<Path>>(&mut self, path: P)
Add plugin search path
Sourcepub fn load_all_plugins(&mut self) -> JitResult<Vec<String>>
pub fn load_all_plugins(&mut self) -> JitResult<Vec<String>>
Load all plugins from search paths
Sourcepub fn find_plugin(&self, name: &str) -> Option<&DynamicPlugin>
pub fn find_plugin(&self, name: &str) -> Option<&DynamicPlugin>
Find plugin by name
Sourcepub fn unload_plugin(&mut self, name: &str) -> JitResult<()>
pub fn unload_plugin(&mut self, name: &str) -> JitResult<()>
Unload plugin
Sourcepub fn list_plugins(&self) -> Vec<&PluginMetadata>
pub fn list_plugins(&self) -> Vec<&PluginMetadata>
List loaded plugins
Sourcepub fn register_custom_op_builder<F>(&mut self, builder: F)
pub fn register_custom_op_builder<F>(&mut self, builder: F)
Register custom operator builder
Sourcepub fn register_optimization_pass<F>(&mut self, factory: F)
pub fn register_optimization_pass<F>(&mut self, factory: F)
Register optimization pass
Sourcepub fn register_backend(&mut self, backend: Box<dyn Backend + Send + Sync>)
pub fn register_backend(&mut self, backend: Box<dyn Backend + Send + Sync>)
Register backend implementation
Sourcepub fn get_custom_op_builders(
&self,
) -> &[Box<dyn Fn() -> JitResult<CustomOpBuilder> + Send + Sync>]
pub fn get_custom_op_builders( &self, ) -> &[Box<dyn Fn() -> JitResult<CustomOpBuilder> + Send + Sync>]
Get custom operator builders
Sourcepub fn get_optimization_passes(
&self,
) -> &[Box<dyn Fn() -> JitResult<Box<dyn OptimizationPass>> + Send + Sync>]
pub fn get_optimization_passes( &self, ) -> &[Box<dyn Fn() -> JitResult<Box<dyn OptimizationPass>> + Send + Sync>]
Get optimization passes
Sourcepub fn get_backend(&self, name: &str) -> Option<&(dyn Backend + Send + Sync)>
pub fn get_backend(&self, name: &str) -> Option<&(dyn Backend + Send + Sync)>
Get backend implementation
Sourcepub fn list_backends(&self) -> Vec<&str>
pub fn list_backends(&self) -> Vec<&str>
List available backends
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginRegistry
impl !RefUnwindSafe for PluginRegistry
impl Send for PluginRegistry
impl Sync for PluginRegistry
impl Unpin for PluginRegistry
impl UnsafeUnpin for PluginRegistry
impl !UnwindSafe for PluginRegistry
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more