pub struct PluginRegistry { /* private fields */ }Expand description
Plugin registry for managing plugins
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
Sourcepub async fn unregister(&mut self, name: &str) -> Result<()>
pub async fn unregister(&mut self, name: &str) -> Result<()>
Unregister a plugin
Sourcepub fn list(&self) -> Vec<PluginMetadata>
pub fn list(&self) -> Vec<PluginMetadata>
List all registered plugins
Sourcepub async fn apply_pre_processing(&self, message: Message) -> Result<Message>
pub async fn apply_pre_processing(&self, message: Message) -> Result<Message>
Apply pre-processing plugins
Sourcepub async fn apply_post_processing(
&self,
response: Response,
) -> Result<Response>
pub async fn apply_post_processing( &self, response: Response, ) -> Result<Response>
Apply post-processing plugins
Sourcepub fn has_permission(&self, plugin_name: &str, permission: &Permission) -> bool
pub fn has_permission(&self, plugin_name: &str, permission: &Permission) -> bool
Check if a plugin has permission
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 !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