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_hooks(&self) -> &Vec<Box<dyn Any>>
pub fn get_mut_hooks(&mut self) -> &mut Vec<Box<dyn Any>>
pub fn set_hooks(&mut self, val: Vec<Box<dyn Any>>) -> &mut Self
pub fn get_arm_changed(&self) -> bool
pub fn get_mut_arm_changed(&mut self) -> &mut bool
pub fn set_arm_changed(&mut self, val: bool) -> &mut Self
pub fn get_hook_index(&self) -> usize
pub fn get_mut_hook_index(&mut self) -> &mut usize
pub fn set_hook_index(&mut self, val: usize) -> &mut Self
pub fn get_cleanups(&self) -> &Vec<Box<dyn FnOnce()>>
pub fn get_mut_cleanups(&mut self) -> &mut Vec<Box<dyn FnOnce()>>
pub fn set_cleanups(&mut self, val: Vec<Box<dyn FnOnce()>>) -> &mut Self
Trait Implementations§
Source§impl Debug for HookContextInner
impl Debug for HookContextInner
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