refactor: refactor code layout by moving ui to another crates

This commit is contained in:
newbee1905
2023-02-02 22:26:18 +07:00
parent 2dea2c86ec
commit 2b4c1079ac
10 changed files with 789 additions and 779 deletions

8
src/ui/app/app.rs Normal file
View File

@@ -0,0 +1,8 @@
use std::io;
use tui::{backend::Backend, Frame, Terminal};
pub trait KamiApp {
fn new() -> Self;
fn run<B: Backend>(&mut self, terminal: &mut Terminal<B>) -> io::Result<()>;
fn ui<B: Backend>(&mut self, f: &mut Frame<B>);
}