pub struct Hooks { /* private fields */ }Expand description
Prepared hook registry keyed by event.
Implementations§
Source§impl Hooks
impl Hooks
Sourcepub fn from_sources(
sources: impl IntoIterator<Item = HookRegistrySource>,
) -> Self
pub fn from_sources( sources: impl IntoIterator<Item = HookRegistrySource>, ) -> Self
Build a hook registry from plugin hook files.
Sourcepub fn from_registered(
hooks: impl IntoIterator<Item = RegisteredHook>,
) -> Result<Self>
pub fn from_registered( hooks: impl IntoIterator<Item = RegisteredHook>, ) -> Result<Self>
Build a hook registry from SDK-registered hooks.
Sourcepub fn prepare(&self, request: HookDispatchRequest) -> PreparedHookDispatch
pub fn prepare(&self, request: HookDispatchRequest) -> PreparedHookDispatch
Prepare matching handlers for one event dispatch.
Sourcepub fn prepare_many<'a>(
hook_sets: impl IntoIterator<Item = &'a Hooks>,
request: HookDispatchRequest,
) -> PreparedHookDispatch
pub fn prepare_many<'a>( hook_sets: impl IntoIterator<Item = &'a Hooks>, request: HookDispatchRequest, ) -> PreparedHookDispatch
Prepare matching handlers across multiple hook registries.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Hooks
impl !UnwindSafe for Hooks
impl Freeze for Hooks
impl Send for Hooks
impl Sync for Hooks
impl Unpin for Hooks
impl UnsafeUnpin for Hooks
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