pub trait ToplevelComponent {
type Props;
// Required method
fn render(
&mut self,
props: impl Borrow<Self::Props>,
area: Rect,
buf: &mut Buffer,
);
}
Expand description
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.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.