nushell/src/format.rs

23 lines
503 B
Rust
Raw Normal View History

2019-05-10 18:59:12 +02:00
crate mod entries;
crate mod generic;
crate mod list;
crate mod table;
2019-06-07 09:50:26 +02:00
crate mod tree;
2019-06-21 06:20:06 +02:00
crate mod vtable;
2019-05-10 18:59:12 +02:00
2019-05-13 23:00:25 +02:00
use crate::prelude::*;
2019-05-10 18:59:12 +02:00
2019-06-08 00:35:07 +02:00
crate use entries::EntriesView;
2019-05-10 18:59:12 +02:00
crate use generic::GenericView;
crate use table::TableView;
2019-06-07 09:50:26 +02:00
crate use tree::TreeView;
2019-06-21 06:20:06 +02:00
crate use vtable::VTableView;
2019-05-10 18:59:12 +02:00
crate trait RenderView {
fn render_view(&self, host: &mut dyn Host) -> Result<(), ShellError>;
2019-05-10 18:59:12 +02:00
}
2019-05-13 23:00:25 +02:00
crate fn print_view(view: &impl RenderView, host: &mut dyn Host) -> Result<(), ShellError> {
view.render_view(host)
2019-05-16 00:58:44 +02:00
}