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

Method required_dimension

cli-table/src/cell.rs:45–57  ·  view source on GitHub ↗

Returns the minimum dimensions required by the cell

(&self)

Source from the content-addressed store, hash-verified

43
44 /// Returns the minimum dimensions required by the cell
45 pub(crate) fn required_dimension(&self) -> Dimension {
46 let height = self.data.len() + self.format.padding.top + self.format.padding.bottom;
47 let width = self
48 .data
49 .iter()
50 .map(|x| display_width(x))
51 .max()
52 .unwrap_or_default()
53 + self.format.padding.left
54 + self.format.padding.right;
55
56 Dimension { width, height }
57 }
58
59 pub(crate) fn buffers(
60 &self,

Callers 1

buffersMethod · 0.45

Calls 1

display_widthFunction · 0.85

Tested by

no test coverage detected