pub struct HookRegistry { /* private fields */ }Expand description
Registry of native hook implementations
Implementations§
Source§impl HookRegistry
impl HookRegistry
Sourcepub fn register_type(&mut self, type_name: &str, hooks: ActionTypeHooks)
pub fn register_type(&mut self, type_name: &str, hooks: ActionTypeHooks)
Register a complete action type with all hooks
Sourcepub fn register_hook(
&mut self,
type_name: &str,
hook_type: HookType,
function: HookFunction,
)
pub fn register_hook( &mut self, type_name: &str, hook_type: HookType, function: HookFunction, )
Register a single hook for an action type
Sourcepub fn get_hook(
&self,
type_name: &str,
hook_type: HookType,
) -> Option<&HookFunction>
pub fn get_hook( &self, type_name: &str, hook_type: HookType, ) -> Option<&HookFunction>
Get hook function if registered
Sourcepub fn has_hook(&self, type_name: &str, hook_type: HookType) -> bool
pub fn has_hook(&self, type_name: &str, hook_type: HookType) -> bool
Check if a hook is registered
Sourcepub fn registered_types(&self) -> Vec<&str>
pub fn registered_types(&self) -> Vec<&str>
Get all registered action types
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HookRegistry
impl !RefUnwindSafe for HookRegistry
impl Send for HookRegistry
impl Sync for HookRegistry
impl Unpin for HookRegistry
impl UnsafeUnpin for HookRegistry
impl !UnwindSafe for HookRegistry
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().