add a vertical record view

This commit is contained in:
JT
2021-10-01 19:01:22 +13:00
parent 99666829e0
commit d6e24cceb4
4 changed files with 65 additions and 1 deletions

View File

@ -16,6 +16,12 @@ impl ValueStream {
)
}
pub fn collect_string(self) -> String {
self.map(|x: Value| x.collect_string())
.collect::<Vec<String>>()
.join("\n")
}
pub fn from_stream(input: impl Iterator<Item = Value> + 'static) -> ValueStream {
ValueStream(Rc::new(RefCell::new(input)))
}