2
0
Fork 0
mirror of https://github.com/nushell/nushell synced 2025-01-22 01:45:15 +00:00
nushell/src/format.rs

22 lines
500 B
Rust
Raw Normal View History

2019-05-10 16:59:12 +00:00
crate mod entries;
crate mod generic;
crate mod list;
crate mod table;
2019-06-07 07:50:26 +00:00
crate mod tree;
2019-05-10 16:59:12 +00:00
2019-05-13 21:00:25 +00:00
use crate::prelude::*;
2019-05-10 16:59:12 +00:00
2019-05-15 16:12:38 +00:00
crate use entries::{EntriesListView, EntriesView};
2019-05-10 16:59:12 +00:00
crate use generic::GenericView;
2019-06-07 06:34:42 +00:00
crate use list::ListView;
2019-05-10 16:59:12 +00:00
crate use table::TableView;
2019-06-07 07:50:26 +00:00
crate use tree::TreeView;
2019-05-10 16:59:12 +00:00
crate trait RenderView {
fn render_view(&self, host: &mut dyn Host) -> Result<(), ShellError>;
2019-05-10 16:59:12 +00:00
}
2019-05-13 21:00:25 +00:00
crate fn print_view(view: &impl RenderView, host: &mut dyn Host) -> Result<(), ShellError> {
view.render_view(host)
2019-05-15 22:58:44 +00:00
}