pub trait Widget: Debug {
    // Required method
    fn render(
        &mut self,
        rect: Rect,
        frame: &mut Frame<'_, CrosstermBackend<Stderr>>
    );

    // Provided methods
    fn handler(&mut self, _event: KeyEvent) -> AppResult<Option<Notification>> { ... }
    fn process_task_response(
        &mut self,
        _response: TaskResponse
    ) -> AppResult<()> { ... }
    fn setup(&mut self) -> AppResult<()> { ... }
    fn process_notification(
        &mut self,
        _notification: Notification
    ) -> AppResult<Option<Notification>> { ... }
}

Required Methods§

source

fn render( &mut self, rect: Rect, frame: &mut Frame<'_, CrosstermBackend<Stderr>> )

Provided Methods§

source

fn handler(&mut self, _event: KeyEvent) -> AppResult<Option<Notification>>

source

fn process_task_response(&mut self, _response: TaskResponse) -> AppResult<()>

source

fn setup(&mut self) -> AppResult<()>

source

fn process_notification( &mut self, _notification: Notification ) -> AppResult<Option<Notification>>

Implementors§