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 arm_changed flag tracks whether a match arm switch occurred;
when toggled, 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_arm_changed(&mut self) -> &mut bool
pub fn get_mut_hook_index(&mut self) -> &mut usize
pub fn get_mut_cleanups(&mut self) -> &mut Vec<Box<dyn FnOnce()>>
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