AnyComponent

Trait AnyComponent 

Source
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§

Source

fn update( &mut self, props: AnyProps<'_>, hooks: Hooks<'_, '_>, updater: &mut ComponentUpdater<'_, '_>, )

Source

fn draw(&mut self, drawer: &mut ComponentDrawer<'_, '_>)

Source

fn calc_children_areas( &self, children: &Components, layout_style: &LayoutStyle, drawer: &mut ComponentDrawer<'_, '_>, ) -> Vec<Rect>

Source

fn poll_change(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()>

Implementors§

Source§

impl<C> AnyComponent for C
where C: Any + Component,