2019-08-29 13:08:28 +02:00
|
|
|
pub(crate) mod entries;
|
|
|
|
pub(crate) mod generic;
|
|
|
|
pub(crate) mod list;
|
|
|
|
pub(crate) mod table;
|
2019-05-10 09:59:12 -07:00
|
|
|
|
2019-05-13 17:00:25 -04:00
|
|
|
use crate::prelude::*;
|
2019-05-10 09:59:12 -07:00
|
|
|
|
2019-08-29 13:08:28 +02:00
|
|
|
pub(crate) use entries::EntriesView;
|
2019-09-01 23:11:05 -07:00
|
|
|
|
2019-08-29 13:08:28 +02:00
|
|
|
pub(crate) use table::TableView;
|
2019-05-10 09:59:12 -07:00
|
|
|
|
2019-08-29 13:08:28 +02:00
|
|
|
pub(crate) trait RenderView {
|
2019-05-24 11:48:33 -07:00
|
|
|
fn render_view(&self, host: &mut dyn Host) -> Result<(), ShellError>;
|
2019-05-10 09:59:12 -07:00
|
|
|
}
|
2019-05-13 17:00:25 -04:00
|
|
|
|
2019-08-29 13:08:28 +02:00
|
|
|
pub(crate) fn print_view(view: &impl RenderView, host: &mut dyn Host) -> Result<(), ShellError> {
|
2019-05-24 11:48:33 -07:00
|
|
|
view.render_view(host)
|
2019-05-15 15:58:44 -07:00
|
|
|
}
|