impl Trait(can run)
This commit is contained in:
13
src/view/component.rs
Normal file
13
src/view/component.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
use std::io;
|
||||
|
||||
use crossterm::event::Event;
|
||||
use ratatui::widgets::Widget;
|
||||
|
||||
pub mod block;
|
||||
pub mod input;
|
||||
pub mod table;
|
||||
|
||||
pub trait Component {
|
||||
fn widget(&self) -> impl Widget;
|
||||
fn event_handler(&mut self, event: Event) -> io::Result<()>;
|
||||
}
|
||||
Reference in New Issue
Block a user