intelli_shell/widgets/
mod.rs

1mod command;
2mod dynamic;
3mod error;
4mod list;
5mod loading;
6mod new_version;
7mod tag;
8mod textarea;
9mod variable;
10
11pub use command::*;
12pub use dynamic::*;
13pub use error::*;
14pub use list::*;
15pub use loading::*;
16pub use new_version::*;
17pub use tag::*;
18pub use textarea::*;
19pub use variable::*;
20
21/// A trait for types that can be converted into a Ratatui widget for display
22pub trait AsWidget {
23    /// Sets the highlighted status
24    fn set_highlighted(&mut self, is_highlighted: bool) {
25        let _ = is_highlighted;
26    }
27
28    /// Converts the object into a Ratatui widget and its size
29    fn as_widget<'a>(&'a self, is_highlighted: bool) -> (impl ratatui::widgets::Widget + 'a, ratatui::layout::Size);
30}