pub struct HookRegistry<State> { /* private fields */ }Implementations§
Source§impl<State: Clone + Serialize> HookRegistry<State>
impl<State: Clone + Serialize> HookRegistry<State>
pub fn register(&mut self, event: LifecycleEvent, hook: Box<dyn Hook<State>>)
pub async fn execute_hooks( &self, ctx: &mut HookContext<State>, event: &LifecycleEvent, ) -> Result<HookAction, HookError>
Trait Implementations§
Source§impl<State: Default> Default for HookRegistry<State>
impl<State: Default> Default for HookRegistry<State>
Source§fn default() -> HookRegistry<State>
fn default() -> HookRegistry<State>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<State> Freeze for HookRegistry<State>
impl<State> !RefUnwindSafe for HookRegistry<State>
impl<State> Send for HookRegistry<State>
impl<State> Sync for HookRegistry<State>
impl<State> Unpin for HookRegistry<State>
impl<State> !UnwindSafe for HookRegistry<State>
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