euv_core/component/struct.rs
1use crate::*;
2
3/// Context provided to a component during rendering.
4///
5/// Holds hook state and tracks the current hook index for this render cycle.
6#[derive(Data, Default)]
7pub struct ComponentContext {
8 /// Internal storage for hooks and state.
9 #[set(pub(crate))]
10 hooks: Vec<Box<dyn Any>>,
11 /// Current hook index for this render cycle.
12 #[set(pub(crate))]
13 hook_index: usize,
14}
15
16/// A handle to a mounted component instance.
17///
18/// Uniquely identifies a component instance within the application.
19#[derive(Data, Default)]
20pub struct ComponentHandle {
21 /// Unique identifier for this component instance.
22 id: usize,
23}