pub struct HookManager { /* private fields */ }Implementations§
Source§impl HookManager
impl HookManager
pub fn new() -> Self
pub fn register(&self, hook_type: HookType, hook: Hook)
pub fn register_fn<F>( &self, hook_type: HookType, name: impl Into<String>, priority: i32, func: F, )
pub fn unregister(&self, hook_type: HookType, name: &str) -> bool
pub async fn trigger( &self, hook_type: HookType, ctx: &mut PluginContext, ) -> Result<()>
pub fn count(&self, hook_type: HookType) -> usize
pub fn clear(&self)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HookManager
impl RefUnwindSafe for HookManager
impl Send for HookManager
impl Sync for HookManager
impl Unpin for HookManager
impl UnwindSafe for HookManager
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