usecrate::*;/// Implementation of ComponentContext construction.
implComponentContext{/// Creates a new empty component context.
pubfnnew()->Self{letmut ctx: ComponentContext =ComponentContext::default();
ctx.set_hooks(Vec::new());
ctx.set_hook_index(0_usize);
ctx
}}/// Implementation of component context lifecycle and utility methods.
implComponentContext{/// Resets the hook index for a new render cycle.
pubfnreset_hook_index(&mutself){self.set_hook_index(0_usize);}}/// Implementation of ComponentHandle construction.
implComponentHandle{/// Creates a new component handle with the given identifier.
pubfnnew(id:usize)->Self{letmut handle: ComponentHandle =ComponentHandle::default();
handle.set_id(id);
handle
}}