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 update_children_areas(
        &mut self,
        children: &Components,
        layout_style: &LayoutStyle,
        drawer: &mut ComponentDrawer<'_, '_>,
    );
    fn poll_change(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()>;
    fn render_ref(&self, area: Rect, buf: &mut Buffer);
}

Required Methods§

Source

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

Source

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

Source

fn update_children_areas( &mut self, children: &Components, layout_style: &LayoutStyle, drawer: &mut ComponentDrawer<'_, '_>, )

Source

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

Source

fn render_ref(&self, area: Rect, buf: &mut Buffer)

Implementors§

Source§

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