Debian Codegraph @

examples/readme_table.rs

raw symbols SCIP
1 use comfy_tablerust-analyzer cargo comfy-table 7.2.2 crate/::{presetsrust-analyzer cargo comfy-table 7.2.2 style/presets/::UTF8_FULLrust-analyzer cargo comfy-table 7.2.2 style/presets/UTF8_FULL., *};
2
3 fn mainrust-analyzer cargo comfy-table 7.2.2 main().() {
4 let mut table = Tablerust-analyzer cargo comfy-table 7.2.2 table/Table#::newrust-analyzer cargo comfy-table 7.2.2 table/impl#[Table]new().();
5 table.load_presetrust-analyzer cargo comfy-table 7.2.2 table/impl#[Table]load_preset().(UTF8_FULLrust-analyzer cargo comfy-table 7.2.2 style/presets/UTF8_FULL.)
6 .set_content_arrangementrust-analyzer cargo comfy-table 7.2.2 table/impl#[Table]set_content_arrangement().(ContentArrangementrust-analyzer cargo comfy-table 7.2.2 style/table/ContentArrangement#::Dynamicrust-analyzer cargo comfy-table 7.2.2 style/table/ContentArrangement#Dynamic#)
7 .set_widthrust-analyzer cargo comfy-table 7.2.2 table/impl#[Table]set_width().(80)
8 .set_headerrust-analyzer cargo comfy-table 7.2.2 table/impl#[Table]set_header().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
9 Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#::newrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]new().("Header1").add_attributerust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]add_attribute().(Attributerust-analyzer cargo crossterm 0.29.0 style/types/attribute/Attribute#::Boldrust-analyzer cargo crossterm 0.29.0 style/types/attribute/Attribute#Bold#),
10 Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#::newrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]new().("Header2").fgrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]fg().(Colorrust-analyzer cargo crossterm 0.29.0 style/types/color/Color#::Greenrust-analyzer cargo crossterm 0.29.0 style/types/color/Color#Green#),
11 Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#::newrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]new().("Header3"),
12 ])
13 .add_rowrust-analyzer cargo comfy-table 7.2.2 table/impl#[Table]add_row().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
14 Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#::newrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]new().("This is a bold text").add_attributerust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]add_attribute().(Attributerust-analyzer cargo crossterm 0.29.0 style/types/attribute/Attribute#::Boldrust-analyzer cargo crossterm 0.29.0 style/types/attribute/Attribute#Bold#),
15 Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#::newrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]new().("This is a green text").fgrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]fg().(Colorrust-analyzer cargo crossterm 0.29.0 style/types/color/Color#::Greenrust-analyzer cargo crossterm 0.29.0 style/types/color/Color#Green#),
16 Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#::newrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]new().("This one has black background").bgrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]bg().(Colorrust-analyzer cargo crossterm 0.29.0 style/types/color/Color#::Blackrust-analyzer cargo crossterm 0.29.0 style/types/color/Color#Black#),
17 ])
18 .add_rowrust-analyzer cargo comfy-table 7.2.2 table/impl#[Table]add_row().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
19 Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#::newrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]new().("Blinky boi").add_attributerust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]add_attribute().(Attributerust-analyzer cargo crossterm 0.29.0 style/types/attribute/Attribute#::SlowBlinkrust-analyzer cargo crossterm 0.29.0 style/types/attribute/Attribute#SlowBlink#),
20 Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#::newrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]new().("This table's content is dynamically arranged. The table is exactly 80 characters wide.\nHere comes a reallylongwordthatshoulddynamicallywrap"),
21 Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#::newrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]new().("COMBINE ALL THE THINGS")
22 .fgrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]fg().(Colorrust-analyzer cargo crossterm 0.29.0 style/types/color/Color#::Greenrust-analyzer cargo crossterm 0.29.0 style/types/color/Color#Green#)
23 .bgrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]bg().(Colorrust-analyzer cargo crossterm 0.29.0 style/types/color/Color#::Blackrust-analyzer cargo crossterm 0.29.0 style/types/color/Color#Black#)
24 .add_attributesrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]add_attributes().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
25 Attributerust-analyzer cargo crossterm 0.29.0 style/types/attribute/Attribute#::Boldrust-analyzer cargo crossterm 0.29.0 style/types/attribute/Attribute#Bold#,
26 Attributerust-analyzer cargo crossterm 0.29.0 style/types/attribute/Attribute#::SlowBlinkrust-analyzer cargo crossterm 0.29.0 style/types/attribute/Attribute#SlowBlink#,
27 ])
28 ]);
29
30 printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!("{table}");
31 }