pub struct Flat { /* private fields */ }Expand description
The textual representation of data.
This is always produced by calling .render(config) on a widget.
Use std::fmt::Display to materialize the flat rendering.
use flat::*;
let schema = Schemas::one("Animal");
let dataset = DatasetBuilder::new(schema)
.add(("whale".to_string(), ))
.add(("shark".to_string(), ))
.add(("shark".to_string(), ))
.add(("tiger".to_string(), ))
.add(("tiger".to_string(), ))
.add(("tiger".to_string(), ))
.build();
let view = dataset.count();
let flat = DagChart::new(&view).render(Render::default());
assert_eq!(
format!("\n{}", flat.to_string()),
r#"
Animal |Sum(Count)
shark |**
tiger |***
whale |*"#);Trait Implementations§
Auto Trait Implementations§
impl Freeze for Flat
impl RefUnwindSafe for Flat
impl Send for Flat
impl Sync for Flat
impl Unpin for Flat
impl UnwindSafe for Flat
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