MCPcopy Create free account
hub / github.com/devashishdxt/cli-table / display

Method display

cli-table/src/table.rs:53–64  ·  view source on GitHub ↗

Returns a struct which implements the `Display` trait

(&self)

Source from the content-addressed store, hash-verified

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<()> {

Callers

nothing calls this directly

Calls 2

appendMethod · 0.80
buffersMethod · 0.45

Tested by

no test coverage detected