Returns a struct which implements the `Display` trait
(&self)
| 51 | |
| 52 | /// Returns a struct which implements the `Display` trait |
| 53 | pub fn display(&self) -> Result<TableDisplay> { |
| 54 | let writer = BufferWriter::stdout(self.color_choice); |
| 55 | let buffers = self.buffers(&writer)?; |
| 56 | |
| 57 | let mut output = Vec::new(); |
| 58 | |
| 59 | for buffer in buffers { |
| 60 | output.append(&mut buffer.into_inner()); |
| 61 | } |
| 62 | |
| 63 | Ok(TableDisplay::new(output)) |
| 64 | } |
| 65 | |
| 66 | /// Prints current table to `stdout` |
| 67 | pub(crate) fn print_stdout(&self) -> Result<()> { |