Skip to main content

Widget

Trait Widget 

Source
pub trait Widget<'a>: Sized {
    // Required method
    fn render_once(self, cx: &'a FrameScope) -> Element<'a>;
}
Expand description

无状态轻量组件接口(不占 PodPool 槽位,直接在 ScratchArena 中内联展开为 div 树)。

Required Methods§

Source

fn render_once(self, cx: &'a FrameScope) -> Element<'a>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§