pub struct PluginContainerManagerImpl {
pub plugin_containers: DashMap<Uuid, PluginContainer>,
}
Fields§
§plugin_containers: DashMap<Uuid, PluginContainer>
The plugin containers.
Trait Implementations§
Source§impl Component for PluginContainerManagerImpl
impl Component for PluginContainerManagerImpl
Source§impl ComponentDowncast<PluginContainerManagerImpl> for PluginContainerManagerImpl
impl ComponentDowncast<PluginContainerManagerImpl> for PluginContainerManagerImpl
Source§impl ComponentDowncast<PluginContainerManagerImpl> for dyn PluginContainerManager + Sync + Send
impl ComponentDowncast<PluginContainerManagerImpl> for dyn PluginContainerManager + Sync + Send
Source§impl Lifecycle for PluginContainerManagerImpl
impl Lifecycle for PluginContainerManagerImpl
§fn init<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn init<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Called at initialization
§fn post_init<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn post_init<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Called after initialization
Source§impl PluginContainerManager for PluginContainerManagerImpl
impl PluginContainerManager for PluginContainerManagerImpl
Source§fn create_and_register_plugin_container(
&self,
stem: String,
path: PathBuf,
) -> Option<Uuid>
fn create_and_register_plugin_container( &self, stem: String, path: PathBuf, ) -> Option<Uuid>
Creates a new plugin container for a plugin with the given file stem. The dynamically linked
library is located at the given path which have to be in the plugin installation folder.
Source§fn remove_plugin_container(&self, id: &Uuid)
fn remove_plugin_container(&self, id: &Uuid)
Returns the plugin with the given id from the list of plugin containers.
Source§fn get_id(&self, stem: &str) -> Option<Uuid>
fn get_id(&self, stem: &str) -> Option<Uuid>
Returns the id of the plugin with the given file stem.
Source§fn get_stem(&self, id: &Uuid) -> Option<String>
fn get_stem(&self, id: &Uuid) -> Option<String>
Returns the file stem of the plugin with the given id.
Source§fn name_canonicalized(&self, id: &Uuid) -> Option<String>
fn name_canonicalized(&self, id: &Uuid) -> Option<String>
Returns the canonicalized name of the plugin with the given id.
Source§fn name_version(&self, id: &Uuid) -> Option<String>
fn name_version(&self, id: &Uuid) -> Option<String>
Returns the canonicalized name and version of the plugin with the given id.
Source§fn description(&self, id: &Uuid) -> Option<String>
fn description(&self, id: &Uuid) -> Option<String>
Returns the description of the plugin with the given id.
Source§fn version(&self, id: &Uuid) -> Option<String>
fn version(&self, id: &Uuid) -> Option<String>
Returns the version of the plugin with the given id.
Source§fn rustc_version(&self, id: &Uuid) -> Option<String>
fn rustc_version(&self, id: &Uuid) -> Option<String>
Returns the version of the rust compiler the plugin with the given id was compiled with.
Source§fn plugin_api_version(&self, id: &Uuid) -> Option<String>
fn plugin_api_version(&self, id: &Uuid) -> Option<String>
Returns the version of the plugin API the plugin with the given id was compiled with.
Source§fn count_by_state(&self, state: &PluginState) -> usize
fn count_by_state(&self, state: &PluginState) -> usize
Returns the count of plugins with the given state.
Source§fn count_by_states(&self) -> String
fn count_by_states(&self) -> String
Returns a string withs stats abouts the states of the plugins
fn count_by_state_str(&self, state: &PluginState) -> String
Source§fn get_plugin_path(&self, id: &Uuid) -> Option<String>
fn get_plugin_path(&self, id: &Uuid) -> Option<String>
Returns the path of the plugin with the given id.
Source§fn get_plugin_state(&self, id: &Uuid) -> Option<PluginState>
fn get_plugin_state(&self, id: &Uuid) -> Option<PluginState>
Returns the state of the plugin with the given id.
Source§fn get_plugins(&self) -> Vec<Uuid>
fn get_plugins(&self) -> Vec<Uuid>
Returns a list of ids of all plugins.
Source§fn get_plugins_with_state(&self, state: PluginState) -> Vec<Uuid>
fn get_plugins_with_state(&self, state: PluginState) -> Vec<Uuid>
Returns a list of ids of plugins with the given state.
Source§fn get_plugins_with_states(
&self,
state1: PluginState,
state2: PluginState,
) -> Vec<Uuid>
fn get_plugins_with_states( &self, state1: PluginState, state2: PluginState, ) -> Vec<Uuid>
Returns a list of ids of plugins which have one of the both states.
Source§fn get_plugins_not_having_state(&self, state: PluginState) -> Vec<Uuid>
fn get_plugins_not_having_state(&self, state: PluginState) -> Vec<Uuid>
Returns a list of ids of plugins which doesn’t have the given state.
Source§fn get_plugin_by_dependency(
&self,
plugin_dependency: &PluginDependency,
) -> Option<Uuid>
fn get_plugin_by_dependency( &self, plugin_dependency: &PluginDependency, ) -> Option<Uuid>
Returns the id of the plugin by a dependency coordinate.
Source§fn deploy_dll(&self, id: &Uuid) -> PluginTransitionResult
fn deploy_dll(&self, id: &Uuid) -> PluginTransitionResult
Deploys the dynamic linked library file from the plugin hot deploy folder into the
plugin installation folder. Read more
Source§fn load_dll(&self, id: &Uuid) -> PluginTransitionResult
fn load_dll(&self, id: &Uuid) -> PluginTransitionResult
Loads the dynamic linked library into memory.
Source§fn load_plugin_declaration(&self, id: &Uuid) -> PluginTransitionResult
fn load_plugin_declaration(&self, id: &Uuid) -> PluginTransitionResult
Loads the plugin declaration of the plugin with the given id. Read more
Source§fn check_plugin_compatibility(&self, id: &Uuid) -> PluginTransitionResult
fn check_plugin_compatibility(&self, id: &Uuid) -> PluginTransitionResult
Performs a compatibility check on the plugin with the given id. Read more
Source§fn load_plugin_dependencies(&self, id: &Uuid) -> PluginTransitionResult
fn load_plugin_dependencies(&self, id: &Uuid) -> PluginTransitionResult
Loads the dependencies of the plugin with the given id. Read more
Source§fn get_dependency_state(&self, dependency: &PluginDependency) -> PluginState
fn get_dependency_state(&self, dependency: &PluginDependency) -> PluginState
Returns the state of the plugin with the given dependency coordinate.
Source§fn has_dependencies(&self, id: &Uuid) -> bool
fn has_dependencies(&self, id: &Uuid) -> bool
Returns true, if the plugin with the given id has one or multiple dependencies.
Source§fn get_dependencies(&self, id: &Uuid) -> DashSet<PluginDependency>
fn get_dependencies(&self, id: &Uuid) -> DashSet<PluginDependency>
Returns a list of dependency coordinates for the plugin with the given id.
Source§fn has_unsatisfied_dependencies(&self, id: &Uuid) -> bool
fn has_unsatisfied_dependencies(&self, id: &Uuid) -> bool
Returns true, if the plugin with the given id has unsatisfied dependencies.
Source§fn get_unsatisfied_dependencies(&self, id: &Uuid) -> DashSet<PluginDependency>
fn get_unsatisfied_dependencies(&self, id: &Uuid) -> DashSet<PluginDependency>
Returns a list of unsatisfied dependencies of the plugin with the given id.
Source§fn get_dependents(&self, id: &Uuid) -> Vec<Uuid>
fn get_dependents(&self, id: &Uuid) -> Vec<Uuid>
Returns a list of plugin ids which are dependents of the plugin with the given id.
Source§fn set_state(&self, id: &Uuid, new_state: PluginState) -> PluginTransitionResult
fn set_state(&self, id: &Uuid, new_state: PluginState) -> PluginTransitionResult
Sets the given new state of the plugin with the given id.
Source§fn resolve_dependencies_state(
&self,
id: &Uuid,
refreshing: bool,
) -> PluginTransitionResult
fn resolve_dependencies_state( &self, id: &Uuid, refreshing: bool, ) -> PluginTransitionResult
Calculates the state of the dependencies of the plugin with the given id.
Source§fn construct_proxy(
&self,
id: &Uuid,
plugin_context: Arc<dyn PluginContext + Send + Sync>,
) -> PluginTransitionResult
fn construct_proxy( &self, id: &Uuid, plugin_context: Arc<dyn PluginContext + Send + Sync>, ) -> PluginTransitionResult
Constructs a plugin proxy object for the plugin with the given id. Read more
Source§fn register(&self, id: &Uuid) -> PluginTransitionResult
fn register(&self, id: &Uuid) -> PluginTransitionResult
Registers providers of the plugin with the given id.
Source§fn activate<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = PluginTransitionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn activate<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = PluginTransitionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Calls the activate method of the plugin with the given id.
Source§fn are_all_stopped(&self) -> bool
fn are_all_stopped(&self) -> bool
Returns true, if all plugins are stopped. Read more
Source§fn deactivate<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = PluginTransitionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn deactivate<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = PluginTransitionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Calls the deactivate method of the plugin with the given id.
Source§fn unregister(&self, id: &Uuid) -> PluginTransitionResult
fn unregister(&self, id: &Uuid) -> PluginTransitionResult
Unregisters the providers of the plugin with the given id.
Source§fn remove_proxy(&self, id: &Uuid) -> PluginTransitionResult
fn remove_proxy(&self, id: &Uuid) -> PluginTransitionResult
Removes the plugin proxy of the plugin with the given id.
Source§fn unload_dll(&self, id: &Uuid) -> PluginTransitionResult
fn unload_dll(&self, id: &Uuid) -> PluginTransitionResult
Closes the library by dropping it.
Source§fn uninstall_dll(&self, id: &Uuid) -> PluginTransitionResult
fn uninstall_dll(&self, id: &Uuid) -> PluginTransitionResult
Deletes the dynamically linked library file.
Source§fn start(&self, id: &Uuid) -> Result<(), PluginStartError>
fn start(&self, id: &Uuid) -> Result<(), PluginStartError>
Start the plugin with the given id.
Source§fn start_by_stem(&self, stem: &str) -> Result<(), PluginStartError>
fn start_by_stem(&self, stem: &str) -> Result<(), PluginStartError>
Starts the plugin with the given file stem.
Source§fn start_dependent_with_satisfied_dependencies(&self, id: &Uuid) -> bool
fn start_dependent_with_satisfied_dependencies(&self, id: &Uuid) -> bool
Starts all plugins which are dependent of the plugin with the given id and
have no unsatisfied dependencies.
Source§fn stop(&self, id: &Uuid) -> Result<(), PluginStopError>
fn stop(&self, id: &Uuid) -> Result<(), PluginStopError>
Stops the given plugin.
Recursively stops all plugins which depends on the stopped plugin.
Source§fn stop_by_stem(&self, stem: &str) -> Result<(), PluginStopError>
fn stop_by_stem(&self, stem: &str) -> Result<(), PluginStopError>
Stops the plugin with the given file stem.
Source§fn stop_active_with_unsatisfied_dependencies(&self) -> bool
fn stop_active_with_unsatisfied_dependencies(&self) -> bool
Stops active plugins which have unsatisfied dependencies.
Source§fn uninstall(&self, id: &Uuid) -> Result<(), PluginUninstallError>
fn uninstall(&self, id: &Uuid) -> Result<(), PluginUninstallError>
Uninstalls the plugin with the given id.
impl Injectable for PluginContainerManagerImpl
Auto Trait Implementations§
impl Freeze for PluginContainerManagerImpl
impl !RefUnwindSafe for PluginContainerManagerImpl
impl Send for PluginContainerManagerImpl
impl Sync for PluginContainerManagerImpl
impl Unpin for PluginContainerManagerImpl
impl UnwindSafe for PluginContainerManagerImpl
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
§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 more