Skip to main content

Component

Trait Component 

Source
pub trait Component: HasFocus {
    // Required method
    fn render(&mut self, area: Layout, buf: &mut Buffer);

    // Provided methods
    fn register_action_tx(&mut self, action_tx: Sender<Action>) { ... }
    fn handle_event<'life0, 'async_trait>(
        &'life0 mut self,
        event: Action,
    ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn cursor(&self) -> Option<(u16, u16)> { ... }
    fn should_render(&self) -> bool { ... }
    fn is_animating(&self) -> bool { ... }
    fn capture_focus_event(&self, _event: &Event) -> bool { ... }
    fn set_index(&mut self, index: usize) { ... }
    fn set_global_help(&self) { ... }
}

Required Methods§

Source

fn render(&mut self, area: Layout, buf: &mut Buffer)

Provided Methods§

Source

fn register_action_tx(&mut self, action_tx: Sender<Action>)

Source

fn handle_event<'life0, 'async_trait>( &'life0 mut self, event: Action, ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn cursor(&self) -> Option<(u16, u16)>

Source

fn should_render(&self) -> bool

Source

fn is_animating(&self) -> bool

Source

fn capture_focus_event(&self, _event: &Event) -> bool

Source

fn set_index(&mut self, index: usize)

Source

fn set_global_help(&self)

Implementors§