pub struct PluginRegistry { /* private fields */ }Implementations§
Source§impl PluginRegistry
impl PluginRegistry
pub fn new() -> Self
pub async fn register(&self, plugin: Arc<dyn Plugin>) -> Result<()>
pub async fn unregister(&self, name: &str) -> Result<Option<Arc<dyn Plugin>>>
pub fn get(&self, name: &str) -> Option<Arc<dyn Plugin>>
pub fn has(&self, name: &str) -> bool
pub fn list(&self) -> Vec<Arc<dyn Plugin>>
pub fn list_by_priority(&self) -> Vec<Arc<dyn Plugin>>
pub fn count(&self) -> usize
pub fn set_enabled(&self, e: bool)
pub fn is_enabled(&self) -> bool
pub async fn trigger_before_request( &self, ctx: &mut PluginContext, ) -> Result<()>
pub async fn trigger_after_response( &self, ctx: &mut PluginContext, ) -> Result<()>
pub async fn trigger_on_error(&self, ctx: &mut PluginContext) -> Result<()>
pub async fn clear(&self) -> Result<()>
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