pub trait AnyComponent:
Any
+ Send
+ Sync
+ Unpin {
// Required methods
fn update(
&mut self,
props: AnyProps<'_>,
hooks: Hooks<'_, '_>,
updater: &mut ComponentUpdater<'_, '_>,
);
fn draw(&mut self, drawer: &mut ComponentDrawer<'_, '_>);
fn calc_children_areas(
&self,
children: &Components,
layout_style: &LayoutStyle,
drawer: &mut ComponentDrawer<'_, '_>,
) -> Vec<Rect>;
fn poll_change(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()>;
}Required Methods§
fn update( &mut self, props: AnyProps<'_>, hooks: Hooks<'_, '_>, updater: &mut ComponentUpdater<'_, '_>, )
fn draw(&mut self, drawer: &mut ComponentDrawer<'_, '_>)
fn calc_children_areas( &self, children: &Components, layout_style: &LayoutStyle, drawer: &mut ComponentDrawer<'_, '_>, ) -> Vec<Rect>
fn poll_change(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".