nushell/src/format.rs

21 lines
480 B
Rust
Raw Normal View History

pub(crate) mod entries;
pub(crate) mod generic;
pub(crate) mod list;
pub(crate) mod table;
pub(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
pub(crate) use entries::EntriesView;
2019-09-02 08:11:05 +02:00
pub(crate) use table::TableView;
pub(crate) use vtable::VTableView;
2019-05-10 18:59:12 +02:00
pub(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
pub(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
}