pub trait Component:
Lifecycle
+ Sized
+ 'static {
const NEEDS_LIFECYCLE: bool = false;
// Required method
fn render(&self) -> NodeId;
// Provided method
fn mount(self) -> NodeId { ... }
}Expand description
Core declarative component trait unifying Lifecycle hooks with framework-managed Context rendering.
Provided Associated Constants§
Sourceconst NEEDS_LIFECYCLE: bool = false
const NEEDS_LIFECYCLE: bool = false
Compile-time opt-in flag indicating whether this component overrides lifecycle hooks or retention policy and requires Rc<Self> observer registration on mount.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Component for DynamicComponentSlot
Component implementation mounting a surgically updatable component slot.
impl Component for DynamicPageOutlet
Component implementation mounting a reactive route-driven dynamic page outlet.
impl Component for DynamicPageSlot
Component implementation mounting a surgically updatable page slot for a fixed route.
impl Component for NodeId
Zero-overhead Component implementation returning an already-mounted NodeId unchanged.