#[derive(IntoElement)]
重导出 rgpui_macros 中的过程宏(AppContext、IntoElement、Render 等) IntoElement 派生宏 - 用于将实现了 RenderOnce 特质的类型转换为 UI 组件。
IntoElement
RenderOnce
该宏会为标记的类型生成 rgpui::IntoElement 特质的实现,使其可以作为 UI 元素在渲染树中使用。
rgpui::IntoElement
#[derive(IntoElement)] struct MyComponent { text: String, }