Struct PluginContainerManagerImpl

Source
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

Source§

fn create( instance_provider: &mut dyn ComponentInstanceProvider, ) -> Result<Self, ComponentInstanceProviderError>

Creates an instance of this component using dependencies from given [ComponentInstanceProvider].
Source§

impl ComponentDowncast<PluginContainerManagerImpl> for PluginContainerManagerImpl

Source§

fn downcast( source: ComponentInstanceAnyPtr, ) -> Result<ComponentInstancePtr<Self>, ComponentInstanceAnyPtr>

Source§

impl ComponentDowncast<PluginContainerManagerImpl> for dyn PluginContainerManager + Sync + Send

Source§

fn downcast( source: ComponentInstanceAnyPtr, ) -> Result<ComponentInstancePtr<Self>, ComponentInstanceAnyPtr>

Source§

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,

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,

Called after initialization
§

fn pre_shutdown<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Called before shutdown
§

fn shutdown<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Called for shutdown
Source§

impl PluginContainerManager for PluginContainerManagerImpl

Source§

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)

Returns the plugin with the given id from the list of plugin containers.
Source§

fn has(&self, stem: &str) -> bool

Returns true, if a plugin with the given file stem exists.
Source§

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>

Returns the file stem of the plugin with the given id.
Source§

fn name(&self, id: &Uuid) -> Option<String>

Returns the name of the plugin with the given id.
Source§

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>

Returns the canonicalized name and version of the plugin with the given id.
Source§

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>

Returns the version of the plugin with the given id.
Source§

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>

Returns the version of the plugin API the plugin with the given id was compiled with.
Source§

fn count(&self) -> usize

Returns the count of all plugins.
Source§

fn count_by_state(&self, state: &PluginState) -> usize

Returns the count of plugins with the given state.
Source§

fn count_by_states(&self) -> String

Returns a string withs stats abouts the states of the plugins
Source§

fn count_by_state_str(&self, state: &PluginState) -> String

Source§

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>

Returns the state of the plugin with the given id.
Source§

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>

Returns a list of ids of plugins with the given state.
Source§

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>

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>

Returns the id of the plugin by a dependency coordinate.
Source§

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

Loads the dynamic linked library into memory.
Source§

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

Performs a compatibility check on the plugin with the given id. Read more
Source§

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

Returns the state of the plugin with the given dependency coordinate.
Source§

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>

Returns a list of dependency coordinates for the plugin with the given id.
Source§

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>

Returns a list of unsatisfied dependencies of the plugin with the given id.
Source§

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

Sets the given new state of the plugin with the given id.
Source§

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

Constructs a plugin proxy object for the plugin with the given id. Read more
Source§

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,

Calls the activate method of the plugin with the given id.
Source§

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,

Calls the deactivate method of the plugin with the given id.
Source§

fn unregister(&self, id: &Uuid) -> PluginTransitionResult

Unregisters the providers of the plugin with the given id.
Source§

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

Closes the library by dropping it.
Source§

fn uninstall_dll(&self, id: &Uuid) -> PluginTransitionResult

Deletes the dynamically linked library file.
Source§

fn start(&self, id: &Uuid) -> Result<(), PluginStartError>

Start the plugin with the given id.
Source§

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

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>

Stops the given plugin. Recursively stops all plugins which depends on the stopped plugin.
Source§

fn stop_by_stem(&self, stem: &str) -> Result<(), PluginStopError>

Stops the plugin with the given file stem.
Source§

fn stop_all(&self)

Stops all plugins.
Source§

fn stop_active_with_unsatisfied_dependencies(&self) -> bool

Stops active plugins which have unsatisfied dependencies.
Source§

fn uninstall(&self, id: &Uuid) -> Result<(), PluginUninstallError>

Uninstalls the plugin with the given id.
Source§

fn redeploy(&self, id: &Uuid) -> Result<(), PluginDeployError>

Redeploys the plugin with the given id.
Source§

fn disable(&self, id: &Uuid) -> Result<(), PluginDisableError>

Disables the plugin with the given id.
Source§

impl Injectable for PluginContainerManagerImpl

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T