pub struct HookContextInner { /* private fields */ }Expand description
Internal storage for hook state, holding boxed Any values.
This struct is not exposed directly; use HookContext instead.
The current_id field tracks which match arm owns the hooks;
when the ID changes, the hook array is cleared to prevent
signal leakage between different match arms.
Implementations§
Source§impl HookContextInner
Implementation of HookContextInner construction.
impl HookContextInner
Implementation of HookContextInner construction.
Source§impl HookContextInner
impl HookContextInner
pub fn get_mut_hooks(&mut self) -> &mut Vec<Box<dyn Any>>
pub fn get_mut_current_id(&mut self) -> &mut u64
pub fn get_mut_hook_index(&mut self) -> &mut usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HookContextInner
impl !RefUnwindSafe for HookContextInner
impl !Send for HookContextInner
impl !Sync for HookContextInner
impl Unpin for HookContextInner
impl UnsafeUnpin for HookContextInner
impl !UnwindSafe for HookContextInner
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