Skip to main content

Component

Trait Component 

Source
pub trait Component {
    // Required method
    fn render<W: Write>(&self, renderer: &mut Renderer<W>) -> Result<u16>;
}
Expand description

A self-rendering UI element.

Components read their panel from the Renderer (set by Renderer::draw). Returns the number of terminal rows consumed, so compositors can stack components.

Required Methods§

Source

fn render<W: Write>(&self, renderer: &mut Renderer<W>) -> Result<u16>

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.

Implementors§

Source§

impl Component for HintComponent

Available on non-tarpaulin_include only.
Source§

impl Component for MascotComponent

Available on non-tarpaulin_include only.
Source§

impl Component for SelectorComponent

Available on non-tarpaulin_include only.
Source§

impl Component for TextComponent

Available on non-tarpaulin_include only.
Source§

impl Component for TextEntryComponent

Available on non-tarpaulin_include only.
Source§

impl Component for TimerBarComponent

Available on non-tarpaulin_include only.