pub struct HookContextInner {
pub hooks: Vec<Box<dyn Any>>,
pub hook_index: usize,
/* 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.
Fields§
§hooks: Vec<Box<dyn Any>>Storage for hook state values (signals, etc.).
hook_index: usizeCurrent hook index, incremented on each hook call and reset per render.
Implementations§
Source§impl HookContextInner
impl HookContextInner
pub fn get_hooks(&self) -> &Vec<Box<dyn Any + 'static>>
pub fn get_mut_hooks(&mut self) -> &mut Vec<Box<dyn Any + 'static>>
pub fn set_hooks(&mut self, val: Vec<Box<dyn Any + 'static>>) -> &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
Trait Implementations§
Source§impl Debug for HookContextInner
impl Debug for HookContextInner
Auto Trait Implementations§
impl !RefUnwindSafe for HookContextInner
impl !Send for HookContextInner
impl !Sync for HookContextInner
impl !UnwindSafe for HookContextInner
impl Freeze for HookContextInner
impl Unpin for HookContextInner
impl UnsafeUnpin 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