pub struct PreExecutionHookRegistration { /* private fields */ }Expand description
Keeps one live pre-execution hook registered.
Dropping the guard, or consuming it with unregister,
removes only this exact registration. An invocation that already snapshotted
the hook may still finish. The guard does not keep its runtime alive.
Implementations§
Source§impl PreExecutionHookRegistration
impl PreExecutionHookRegistration
Sourcepub fn audience(&self) -> Option<&ToolAudience>
pub fn audience(&self) -> Option<&ToolAudience>
Returns the audience this hook is scoped to, or None when it is global.
Sourcepub fn unregister(self) -> bool
pub fn unregister(self) -> bool
Unregisters this exact hook now.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PreExecutionHookRegistration
impl RefUnwindSafe for PreExecutionHookRegistration
impl Send for PreExecutionHookRegistration
impl Sync for PreExecutionHookRegistration
impl Unpin for PreExecutionHookRegistration
impl UnsafeUnpin for PreExecutionHookRegistration
impl UnwindSafe for PreExecutionHookRegistration
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