Skip to main content

Component

Trait Component 

Source
pub trait Component {
    // Required methods
    fn render(&self, frame: &mut Frame, area: Rect);
    fn handle_event(&mut self, event: &Event) -> bool;
}
Expand description

组件系统相关功能 组件 trait

Required Methods§

Source

fn render(&self, frame: &mut Frame, area: Rect)

渲染组件

Source

fn handle_event(&mut self, event: &Event) -> bool

处理事件

Implementors§