pub enum View {
Table {
title: String,
columns: Vec<String>,
rows: Vec<Vec<Json>>,
},
Chart {
title: String,
x_name: String,
x: Vec<f64>,
x_time: bool,
series: Vec<(String, Vec<f64>)>,
},
Text {
title: String,
text: String,
},
Tiles {
title: String,
below: bool,
tiles: Vec<View>,
},
}Expand description
What a run shows: a table, a chart, text, or tiles of those. A host may show tables as list tiles and charts as chart tiles, side by side for tiles.
Variants§
Implementations§
Source§impl View
impl View
pub fn table(title: &str, columns: &[&str]) -> View
pub fn chart(title: &str) -> View
Sourcepub fn x(self, name: &str, values: Vec<f64>, time: bool) -> View
pub fn x(self, name: &str, values: Vec<f64>, time: bool) -> View
The x axis (time: epoch milliseconds).
pub fn text(title: &str, text: &str) -> View
Sourcepub fn tiles(title: &str, below: bool, tiles: Vec<View>) -> View
pub fn tiles(title: &str, below: bool, tiles: Vec<View>) -> View
Tiles side by side (below: stacked).
pub fn to_json(&self) -> Json
Trait Implementations§
impl StructuralPartialEq for View
Auto Trait Implementations§
impl Forget for View
impl Freeze for View
impl Move for View
impl RefUnwindSafe for View
impl Send for View
impl Sync for View
impl Unpin for View
impl UnsafeUnpin for View
impl UnwindSafe for View
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more