MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / set_header

Method set_header

atomic-cli/src/output/table.rs:316–323  ·  view source on GitHub ↗

Set the header row from simple string values. This creates columns with default settings from header strings.

(&mut self, headers: I)

Source from the content-addressed store, hash-verified

314 ///
315 /// This creates columns with default settings from header strings.
316 pub fn set_header<I, S>(&mut self, headers: I) -> &mut Self
317 where
318 I: IntoIterator<Item = S>,
319 S: Into<String>,
320 {
321 self.columns = headers.into_iter().map(|h| Column::new(h)).collect();
322 self
323 }
324
325 /// Set whether to show the header separator line.
326 pub fn show_header_separator(&mut self, show: bool) -> &mut Self {

Callers 8

test_table_set_headerFunction · 0.80
test_table_add_rowFunction · 0.80
test_table_render_basicFunction · 0.80
test_table_missing_cellsFunction · 0.80
test_table_unicodeFunction · 0.80
test_table_emojiFunction · 0.80

Calls 1

into_iterMethod · 0.45

Tested by 8

test_table_set_headerFunction · 0.64
test_table_add_rowFunction · 0.64
test_table_render_basicFunction · 0.64
test_table_missing_cellsFunction · 0.64
test_table_unicodeFunction · 0.64
test_table_emojiFunction · 0.64