pub struct HookSet { /* private fields */ }Expand description
An ordered list of hooks to attach to an agent.
Hooks at the same HookPoint fire in registration order.
Implementations§
Source§impl HookSet
impl HookSet
Sourcepub fn push(&mut self, entry: HookEntry) -> Result<(), Error>
pub fn push(&mut self, entry: HookEntry) -> Result<(), Error>
Register a hook.
If a hook with the same name AND hook point already exists, it is replaced and a warning is logged.
§Errors
Returns Err if the entry fails validation (empty name or callback_id).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HookSet
impl<'de> Deserialize<'de> for HookSet
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromIterator<HookEntry> for HookSet
impl FromIterator<HookEntry> for HookSet
Source§impl IntoIterator for HookSet
impl IntoIterator for HookSet
Auto Trait Implementations§
impl Freeze for HookSet
impl RefUnwindSafe for HookSet
impl Send for HookSet
impl Sync for HookSet
impl Unpin for HookSet
impl UnsafeUnpin for HookSet
impl UnwindSafe for HookSet
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