nushell/src/format.rs

23 lines
471 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;
use crate::object::Value;
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;
crate use list::ListView;
crate use table::TableView;
crate trait RenderView {
fn render_view(&self, host: &dyn Host) -> Vec<String>;
}
2019-05-13 21:00:25 +00:00
crate fn print_rendered(lines: &[String], host: &mut dyn Host) {
for line in lines {
host.stdout(line);
}
}