pub struct PluginManager { /* private fields */ }Expand description
Main plugin manager
Implementations§
Source§impl PluginManager
impl PluginManager
Sourcepub fn with_config(
AirVersion: String,
EnableSandbox: bool,
StartupTimeoutSecs: u64,
OperationTimeoutSecs: u64,
) -> Self
pub fn with_config( AirVersion: String, EnableSandbox: bool, StartupTimeoutSecs: u64, OperationTimeoutSecs: u64, ) -> Self
Create a new plugin manager with custom configuration
Sourcepub fn set_sandbox_enabled(&mut self, enabled: bool)
pub fn set_sandbox_enabled(&mut self, enabled: bool)
Enable or disable sandbox mode
Sourcepub async fn discover_plugins(&self, directory: &str) -> Result<Vec<String>>
pub async fn discover_plugins(&self, directory: &str) -> Result<Vec<String>>
Discover plugins from a directory
Sourcepub async fn load_from_manifest(&self, path: &str) -> Result<String>
pub async fn load_from_manifest(&self, path: &str) -> Result<String>
Load a plugin from a manifest file
Sourcepub fn ValidatePluginMetadata(&self, metadata: &PluginMetadata) -> Result<()>
pub fn ValidatePluginMetadata(&self, metadata: &PluginMetadata) -> Result<()>
Validate plugin metadata
Sourcepub fn validate_capabilities_and_permissions(
&self,
plugin: &dyn Plugin,
) -> Result<()>
pub fn validate_capabilities_and_permissions( &self, plugin: &dyn Plugin, ) -> Result<()>
Validate plugin capabilities and permissions
Sourcepub fn CheckAirVersionCompatibility(
&self,
metadata: &PluginMetadata,
) -> Result<()>
pub fn CheckAirVersionCompatibility( &self, metadata: &PluginMetadata, ) -> Result<()>
Check Air version compatibility
Sourcepub fn CheckApiVersionCompatibility(
&self,
_Metadata: &PluginMetadata,
) -> Result<()>
pub fn CheckApiVersionCompatibility( &self, _Metadata: &PluginMetadata, ) -> Result<()>
Check API version compatibility
Sourcepub async fn check_dependencies(&self, metadata: &PluginMetadata) -> Result<()>
pub async fn check_dependencies(&self, metadata: &PluginMetadata) -> Result<()>
Check plugin dependencies
Sourcepub async fn send_message(
&self,
message: PluginMessage,
) -> Result<PluginMessage>
pub async fn send_message( &self, message: PluginMessage, ) -> Result<PluginMessage>
Send message from one plugin to another
Sourcepub async fn list_plugins(&self) -> Result<Vec<PluginInfo>>
pub async fn list_plugins(&self) -> Result<Vec<PluginInfo>>
Get plugin list with details
Sourcepub async fn get_plugin_state(&self, plugin_id: &str) -> Result<Value>
pub async fn get_plugin_state(&self, plugin_id: &str) -> Result<Value>
Get plugin state
Sourcepub async fn get_plugin_permissions(
&self,
plugin_id: &str,
) -> Result<Vec<PluginPermission>>
pub async fn get_plugin_permissions( &self, plugin_id: &str, ) -> Result<Vec<PluginPermission>>
Get plugin permissions
Sourcepub async fn validate_all_plugins(
&self,
) -> Vec<(String, PluginValidationResult)>
pub async fn validate_all_plugins( &self, ) -> Vec<(String, PluginValidationResult)>
Validate all plugins
Sourcepub fn validate_plugin(&self, plugin: &dyn Plugin) -> PluginValidationResult
pub fn validate_plugin(&self, plugin: &dyn Plugin) -> PluginValidationResult
Validate a single plugin
Sourcepub async fn get_dependency_graph(&self) -> Result<Value>
pub async fn get_dependency_graph(&self) -> Result<Value>
Get dependency graph
Sourcepub async fn resolve_load_order(&self) -> Result<Vec<String>>
pub async fn resolve_load_order(&self) -> Result<Vec<String>>
Resolve plugin load order based on dependencies
Auto Trait Implementations§
impl Freeze for PluginManager
impl !RefUnwindSafe for PluginManager
impl Send for PluginManager
impl Sync for PluginManager
impl Unpin for PluginManager
impl !UnwindSafe for PluginManager
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>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].