pub struct PluginLoader { /* private fields */ }Expand description
Plugin loader for dynamic plugin loading
Implementations§
Source§impl PluginLoader
impl PluginLoader
Sourcepub fn with_paths(paths: Vec<PathBuf>) -> Self
pub fn with_paths(paths: Vec<PathBuf>) -> Self
Creates a new plugin loader with custom search paths
Sourcepub async fn add_search_path(&self, path: PathBuf)
pub async fn add_search_path(&self, path: PathBuf)
Adds a search path for plugins
Sourcepub async fn search_paths(&self) -> Vec<PathBuf>
pub async fn search_paths(&self) -> Vec<PathBuf>
Gets all search paths
Sourcepub async fn clear_search_paths(&self)
pub async fn clear_search_paths(&self)
Clears all search paths
Sourcepub async fn load_all(
&self,
registry: &mut PluginRegistry,
) -> PluginResult<Vec<String>>
pub async fn load_all( &self, registry: &mut PluginRegistry, ) -> PluginResult<Vec<String>>
Loads plugins from all search paths
Sourcepub async fn load(
&self,
path: &PathBuf,
) -> PluginResult<Box<dyn DMSCHardwareDiscoveryPlugin>>
pub async fn load( &self, path: &PathBuf, ) -> PluginResult<Box<dyn DMSCHardwareDiscoveryPlugin>>
Loads a specific plugin file
Sourcepub async fn validate(&self, path: &PathBuf) -> PluginResult<PluginMetadata>
pub async fn validate(&self, path: &PathBuf) -> PluginResult<PluginMetadata>
Validates a plugin file without loading it
Sourcepub async fn get_api_version(&self, path: &PathBuf) -> PluginResult<u32>
pub async fn get_api_version(&self, path: &PathBuf) -> PluginResult<u32>
Gets the plugin API version from a library
Sourcepub async fn is_compatible(&self, path: &PathBuf) -> bool
pub async fn is_compatible(&self, path: &PathBuf) -> bool
Checks if a plugin file is compatible with the current DMSC version
Trait Implementations§
Source§impl Default for PluginLoader
impl Default for PluginLoader
Source§fn default() -> PluginLoader
fn default() -> PluginLoader
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PluginLoader
impl !RefUnwindSafe for PluginLoader
impl Send for PluginLoader
impl Sync for PluginLoader
impl Unpin for PluginLoader
impl !UnwindSafe for PluginLoader
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request