[][src]Trait tui_react::ToplevelComponent

pub trait ToplevelComponent {
    type Props;
    fn render(
        &mut self,
        props: impl Borrow<Self::Props>,
        area: Rect,
        buf: &mut Buffer
    ); }

A component meant to be rendered by Terminal::render(...). All other components don't have to implement this trait, and instead provide a render method by convention, tuned towards their needs using whichever generic types or lifetimes they need.

Associated Types

type Props

Loading content...

Required methods

fn render(
    &mut self,
    props: impl Borrow<Self::Props>,
    area: Rect,
    buf: &mut Buffer
)

Loading content...

Implementors

Loading content...