| 1 | use comfy_tablerust-analyzer cargo comfy-table 7.2.2 crate/::{Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#, ContentArrangementrust-analyzer cargo comfy-table 7.2.2 style/table/ContentArrangement#, Rowrust-analyzer cargo comfy-table 7.2.2 row/Row#, Tablerust-analyzer cargo comfy-table 7.2.2 table/Table#}; |
| 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_preset(comfy_table::presets::NOTHING); |
| 6 | table.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 | table.set_widthrust-analyzer cargo comfy-table 7.2.2 table/impl#[Table]set_width().(85); |
| 8 | |
| 9 | let mut row = Rowrust-analyzer cargo comfy-table 7.2.2 row/Row#::newrust-analyzer cargo comfy-table 7.2.2 row/impl#[Row]new().(); |
| 10 | row.add_cellrust-analyzer cargo comfy-table 7.2.2 row/impl#[Row]add_cell().(Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#::newrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]new().(formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!( |
| 11 | "List of devices:\n{}", |
| 12 | consolerust-analyzer cargo console 0.16.1 crate/::stylerust-analyzer cargo console 0.16.1 utils/style().("Blockdevices\nCryptdevices").dimrust-analyzer cargo console 0.16.1 utils/impl#[`StyledObject<D>`]dim().().bluerust-analyzer cargo console 0.16.1 utils/impl#[`StyledObject<D>`]blue().() |
| 13 | ))); |
| 14 | row.add_cellrust-analyzer cargo comfy-table 7.2.2 row/impl#[Row]add_cell().(Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#::newrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]new().("")); |
| 15 | |
| 16 | table.add_rowrust-analyzer cargo comfy-table 7.2.2 table/impl#[Table]add_row().(row); |
| 17 | |
| 18 | let mut row = Rowrust-analyzer cargo comfy-table 7.2.2 row/Row#::newrust-analyzer cargo comfy-table 7.2.2 row/impl#[Row]new().(); |
| 19 | row.add_cellrust-analyzer cargo comfy-table 7.2.2 row/impl#[Row]add_cell().(Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#::newrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]new().(formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!( |
| 20 | "Block devices: \n/dev/{}\n/dev/{}", |
| 21 | consolerust-analyzer cargo console 0.16.1 crate/::stylerust-analyzer cargo console 0.16.1 utils/style().("sda1").boldrust-analyzer cargo console 0.16.1 utils/impl#[`StyledObject<D>`]bold().().redrust-analyzer cargo console 0.16.1 utils/impl#[`StyledObject<D>`]red().(), |
| 22 | consolerust-analyzer cargo console 0.16.1 crate/::stylerust-analyzer cargo console 0.16.1 utils/style().("sda2").boldrust-analyzer cargo console 0.16.1 utils/impl#[`StyledObject<D>`]bold().().redrust-analyzer cargo console 0.16.1 utils/impl#[`StyledObject<D>`]red().() |
| 23 | ))); |
| 24 | row.add_cellrust-analyzer cargo comfy-table 7.2.2 row/impl#[Row]add_cell().(Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#::newrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]new().("These are some block devices that were found.")); |
| 25 | table.add_rowrust-analyzer cargo comfy-table 7.2.2 table/impl#[Table]add_row().(row); |
| 26 | |
| 27 | let mut row = Rowrust-analyzer cargo comfy-table 7.2.2 row/Row#::newrust-analyzer cargo comfy-table 7.2.2 row/impl#[Row]new().(); |
| 28 | row.add_cellrust-analyzer cargo comfy-table 7.2.2 row/impl#[Row]add_cell().(Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#::newrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]new().(formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!( |
| 29 | "Crypt devices: \n/dev/mapper/{}", |
| 30 | consolerust-analyzer cargo console 0.16.1 crate/::stylerust-analyzer cargo console 0.16.1 utils/style().("cryptroot").boldrust-analyzer cargo console 0.16.1 utils/impl#[`StyledObject<D>`]bold().().yellowrust-analyzer cargo console 0.16.1 utils/impl#[`StyledObject<D>`]yellow().() |
| 31 | ))); |
| 32 | row.add_cellrust-analyzer cargo comfy-table 7.2.2 row/impl#[Row]add_cell().(Cellrust-analyzer cargo comfy-table 7.2.2 cell/Cell#::newrust-analyzer cargo comfy-table 7.2.2 cell/impl#[Cell]new().("This one seems to be encrypted.")); |
| 33 | table.add_rowrust-analyzer cargo comfy-table 7.2.2 table/impl#[Table]add_row().(row); |
| 34 | |
| 35 | printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!("{}", table); |
| 36 | } |