2024-01-24 11:50:18 -08:00
|
|
|
//! # [Ratatui] Demo2 example
|
|
|
|
//!
|
|
|
|
//! The latest version of this example is available in the [examples] folder in the repository.
|
|
|
|
//!
|
|
|
|
//! Please note that the examples are designed to be run against the `main` branch of the Github
|
|
|
|
//! repository. This means that you may not be able to compile with the latest release version on
|
|
|
|
//! crates.io, or the one that you have installed locally.
|
|
|
|
//!
|
|
|
|
//! See the [examples readme] for more information on finding examples that match the version of the
|
|
|
|
//! library you are using.
|
|
|
|
//!
|
|
|
|
//! [Ratatui]: https://github.com/ratatui-org/ratatui
|
|
|
|
//! [examples]: https://github.com/ratatui-org/ratatui/blob/main/examples
|
|
|
|
//! [examples readme]: https://github.com/ratatui-org/ratatui/blob/main/examples/README.md
|
|
|
|
|
2024-03-02 10:06:53 +01:00
|
|
|
#![allow(
|
|
|
|
clippy::enum_glob_use,
|
|
|
|
clippy::missing_errors_doc,
|
|
|
|
clippy::module_name_repetitions,
|
|
|
|
clippy::must_use_candidate,
|
|
|
|
clippy::wildcard_imports
|
|
|
|
)]
|
|
|
|
|
2023-09-21 01:47:23 -07:00
|
|
|
mod app;
|
2024-01-13 15:13:50 -08:00
|
|
|
mod big_text;
|
2023-09-21 01:47:23 -07:00
|
|
|
mod colors;
|
2024-01-24 11:44:16 -08:00
|
|
|
mod destroy;
|
|
|
|
mod errors;
|
2023-09-21 01:47:23 -07:00
|
|
|
mod tabs;
|
|
|
|
mod term;
|
|
|
|
mod theme;
|
|
|
|
|
2024-01-24 11:44:16 -08:00
|
|
|
pub use app::*;
|
|
|
|
use color_eyre::Result;
|
|
|
|
pub use colors::*;
|
|
|
|
pub use term::*;
|
|
|
|
pub use theme::*;
|
|
|
|
|
2023-09-21 01:47:23 -07:00
|
|
|
fn main() -> Result<()> {
|
2024-01-24 11:44:16 -08:00
|
|
|
errors::init_hooks()?;
|
|
|
|
let terminal = &mut term::init()?;
|
2024-04-16 20:02:39 +02:00
|
|
|
App::default().run(terminal)?;
|
2024-01-24 11:44:16 -08:00
|
|
|
term::restore()?;
|
|
|
|
Ok(())
|
2023-09-21 01:47:23 -07:00
|
|
|
}
|