Debian Codegraph @

src/canvas/widgets/network_basic.rs

raw symbols SCIP
1 use ratatuirust-analyzer cargo ratatui 0.30.2 crate/::{
2 Framerust-analyzer cargo ratatui-core 0.1.2 terminal/frame/Frame#,
3 layoutrust-analyzer cargo ratatui-core 0.1.2 layout/::{Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#, Directionrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#, Layoutrust-analyzer cargo ratatui-core 0.1.2 layout/layout/Layout#, Rectrust-analyzer cargo ratatui-core 0.1.2 layout/rect/Rect#},
4 textrust-analyzer cargo ratatui-core 0.1.2 text/::{Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#, Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#},
5 widgetsrust-analyzer cargo ratatui 0.30.2 widgets/::{Blockrust-analyzer cargo ratatui-widgets 0.3.2 block/Block#, Paragraphrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/Paragraph#},
6 };
7
8 use craterust-analyzer cargo bottom 0.14.9 crate/::{
9 apprust-analyzer cargo bottom 0.14.9 app/::Apprust-analyzer cargo bottom 0.14.9 app/App#,
10 canvasrust-analyzer cargo bottom 0.14.9 canvas/::{
11 Painterrust-analyzer cargo bottom 0.14.9 canvas/Painter#,
12 drawing_utilsrust-analyzer cargo bottom 0.14.9 canvas/drawing_utils/::widget_blockrust-analyzer cargo bottom 0.14.9 canvas/drawing_utils/widget_block().,
13 widgetsrust-analyzer cargo bottom 0.14.9 canvas/widgets/::{PacketInforust-analyzer cargo bottom 0.14.9 canvas/widgets/PacketInfo#, calculate_packet_inforust-analyzer cargo bottom 0.14.9 canvas/widgets/calculate_packet_info().},
14 },
15 utilsrust-analyzer cargo bottom 0.14.9 utils/::data_unitsrust-analyzer cargo bottom 0.14.9 utils/data_units/::{convert_bitsrust-analyzer cargo bottom 0.14.9 utils/data_units/convert_bits()., get_unit_prefixrust-analyzer cargo bottom 0.14.9 utils/data_units/get_unit_prefix().},
16 };
17
18 impl Painterrust-analyzer cargo bottom 0.14.9 canvas/Painter# {
19 pub fn draw_basic_networkrust-analyzer cargo bottom 0.14.9 canvas/widgets/network_basic/impl#[Painter]draw_basic_network().(
20 &self, f: &mut Framerust-analyzer cargo ratatui-core 0.1.2 terminal/frame/Frame#<'_>, app_state: &mut Apprust-analyzer cargo bottom 0.14.9 app/App#, draw_loc: Rectrust-analyzer cargo ratatui-core 0.1.2 layout/rect/Rect#, widget_id: u64,
21 ) {
22 let show_packets = app_state.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..network_show_packetsrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#network_show_packets.;
23
24 f.render_widgetrust-analyzer cargo ratatui-core 0.1.2 terminal/frame/impl#[`Frame<'_>`]render_widget().(
25 widget_blockrust-analyzer cargo bottom 0.14.9 canvas/drawing_utils/widget_block().(
26 true,
27 app_state.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_idrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_id. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]eq().widget_id,
28 self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..border_typerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#border_type.,
29 self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..general_widget_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#general_widget_style.,
30 )
31 .border_stylerust-analyzer cargo ratatui-widgets 0.3.2 block/impl#[`Block<'a>`]border_style().(self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..highlighted_border_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#highlighted_border_style.),
32 draw_loc,
33 );
34
35 let use_binary_prefix = app_state.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..network_use_binary_prefixrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#network_use_binary_prefix.;
36 let network_data = &(app_state.data_storerust-analyzer cargo bottom 0.14.9 app/App#data_store..get_datarust-analyzer cargo bottom 0.14.9 app/data/store/impl#[DataStore]get_data().().network_harvestrust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#network_harvest.);
37 let rx = get_unit_prefixrust-analyzer cargo bottom 0.14.9 utils/data_units/get_unit_prefix().(network_data.rxrust-analyzer cargo bottom 0.14.9 collection/network/NetworkHarvest#rx., use_binary_prefix);
38 let tx = get_unit_prefixrust-analyzer cargo bottom 0.14.9 utils/data_units/get_unit_prefix().(network_data.txrust-analyzer cargo bottom 0.14.9 collection/network/NetworkHarvest#tx., use_binary_prefix);
39 let total_rx = convert_bitsrust-analyzer cargo bottom 0.14.9 utils/data_units/convert_bits().(network_data.total_rxrust-analyzer cargo bottom 0.14.9 collection/network/NetworkHarvest#total_rx., use_binary_prefix);
40 let total_tx = convert_bitsrust-analyzer cargo bottom 0.14.9 utils/data_units/convert_bits().(network_data.total_txrust-analyzer cargo bottom 0.14.9 collection/network/NetworkHarvest#total_tx., use_binary_prefix);
41
42 let rx_label = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("RX: {:.1}{}/s", rx.0, rx.1);
43 let tx_label = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("TX: {:.1}{}/s", tx.0, tx.1);
44 let total_rx_label = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("Total RX: {:.1}{}", total_rx.0, total_rx.1);
45 let total_tx_label = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("Total TX: {:.1}{}", total_tx.0, total_tx.1);
46
47 // Determine if we need grid layout based on available width
48 // Assume we need at least ~15 chars per column for horizontal layout
49 // With 4 columns, that's ~60 chars minimum
50 // If width is less than 60, use grid layout (4 rows x 2 columns)
51 if show_packets {
52 let PacketInforust-analyzer cargo bottom 0.14.9 canvas/widgets/PacketInfo# {
53 rx_packet_raterust-analyzer cargo bottom 0.14.9 canvas/widgets/PacketInfo#rx_packet_rate.,
54 tx_packet_raterust-analyzer cargo bottom 0.14.9 canvas/widgets/PacketInfo#tx_packet_rate.,
55 avg_rx_packet_sizerust-analyzer cargo bottom 0.14.9 canvas/widgets/PacketInfo#avg_rx_packet_size.,
56 avg_tx_packet_sizerust-analyzer cargo bottom 0.14.9 canvas/widgets/PacketInfo#avg_tx_packet_size.,
57 } = calculate_packet_inforust-analyzer cargo bottom 0.14.9 canvas/widgets/calculate_packet_info().(network_data, use_binary_prefix);
58
59 // TODO: Stylize packet stuff later with something else? Or maybe make it so
60 // total is now (by default) just bolded RX/TX? I doubt anyone cares...
61 let rx_packet_rate_label = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("RX Pkt: {}pkt/s", rx_packet_rate);
62 let tx_packet_rate_label = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("TX Pkt: {}pkt/s", tx_packet_rate);
63 let avg_rx_packet_size_label = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!(
64 "Avg RX Pkt: {:.1}{}",
65 avg_rx_packet_size.0, avg_rx_packet_size.1
66 );
67 let avg_tx_packet_size_label = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!(
68 "Avg TX Pkt: {:.1}{}",
69 avg_tx_packet_size.0, avg_tx_packet_size.1
70 );
71
72 if draw_loc.widthrust-analyzer cargo ratatui-core 0.1.2 layout/rect/Rect#width. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().60 {
73 // 4 rows x 2 columns layout
74 // Column 1: RX, TX, Total RX, Total TX (top to bottom)
75 // Column 2: RX Packets, TX Packets, AVG RX, AVG TX (top to bottom)
76 let grid_loc = Layoutrust-analyzer cargo ratatui-core 0.1.2 layout/layout/Layout#::defaultrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout][Default]default().()
77 .directionrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]direction().(Directionrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#::Horizontalrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#Horizontal#)
78 .constraintsrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]constraints().([Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(50), Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(50)])
79 .splitrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]split().(draw_loc);
80
81 // Column 1: RX, TX, Total RX, Total TX
82 let col1_loc = Layoutrust-analyzer cargo ratatui-core 0.1.2 layout/layout/Layout#::defaultrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout][Default]default().()
83 .directionrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]direction().(Directionrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#::Verticalrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#Vertical#)
84 .constraintsrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]constraints().([
85 Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(25),
86 Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(25),
87 Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(25),
88 Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(25),
89 ])
90 .splitrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]split().(grid_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().);
91 f.render_widgetrust-analyzer cargo ratatui-core 0.1.2 terminal/frame/impl#[`Frame<'_>`]render_widget().(
92 Paragraphrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/Paragraph#::newrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]new().(Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(rx_label, self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..rx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#rx_style.)))
93 .blockrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]block().(Blockrust-analyzer cargo ratatui-widgets 0.3.2 block/Block#::defaultrust-analyzer cargo ratatui-widgets 0.3.2 block/impl#[`Block<'a>`][Default]default().()),
94 col1_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
95 );
96 f.render_widgetrust-analyzer cargo ratatui-core 0.1.2 terminal/frame/impl#[`Frame<'_>`]render_widget().(
97 Paragraphrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/Paragraph#::newrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]new().(Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(tx_label, self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..tx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#tx_style.)))
98 .blockrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]block().(Blockrust-analyzer cargo ratatui-widgets 0.3.2 block/Block#::defaultrust-analyzer cargo ratatui-widgets 0.3.2 block/impl#[`Block<'a>`][Default]default().()),
99 col1_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
100 );
101 f.render_widgetrust-analyzer cargo ratatui-core 0.1.2 terminal/frame/impl#[`Frame<'_>`]render_widget().(
102 Paragraphrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/Paragraph#::newrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]new().(Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(
103 total_rx_label,
104 self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..total_rx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#total_rx_style.,
105 )))
106 .blockrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]block().(Blockrust-analyzer cargo ratatui-widgets 0.3.2 block/Block#::defaultrust-analyzer cargo ratatui-widgets 0.3.2 block/impl#[`Block<'a>`][Default]default().()),
107 col1_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
108 );
109 f.render_widgetrust-analyzer cargo ratatui-core 0.1.2 terminal/frame/impl#[`Frame<'_>`]render_widget().(
110 Paragraphrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/Paragraph#::newrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]new().(Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(
111 total_tx_label,
112 self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..total_tx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#total_tx_style.,
113 )))
114 .blockrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]block().(Blockrust-analyzer cargo ratatui-widgets 0.3.2 block/Block#::defaultrust-analyzer cargo ratatui-widgets 0.3.2 block/impl#[`Block<'a>`][Default]default().()),
115 col1_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().3]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
116 );
117
118 // Column 2: RX Packets, TX Packets, AVG RX, AVG TX
119 let col2_loc = Layoutrust-analyzer cargo ratatui-core 0.1.2 layout/layout/Layout#::defaultrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout][Default]default().()
120 .directionrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]direction().(Directionrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#::Verticalrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#Vertical#)
121 .constraintsrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]constraints().([
122 Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(25),
123 Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(25),
124 Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(25),
125 Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(25),
126 ])
127 .splitrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]split().(grid_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().);
128 f.render_widgetrust-analyzer cargo ratatui-core 0.1.2 terminal/frame/impl#[`Frame<'_>`]render_widget().(
129 Paragraphrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/Paragraph#::newrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]new().(Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(
130 rx_packet_rate_label,
131 self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..rx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#rx_style.,
132 )))
133 .blockrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]block().(Blockrust-analyzer cargo ratatui-widgets 0.3.2 block/Block#::defaultrust-analyzer cargo ratatui-widgets 0.3.2 block/impl#[`Block<'a>`][Default]default().()),
134 col2_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
135 );
136 f.render_widgetrust-analyzer cargo ratatui-core 0.1.2 terminal/frame/impl#[`Frame<'_>`]render_widget().(
137 Paragraphrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/Paragraph#::newrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]new().(Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(
138 tx_packet_rate_label,
139 self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..tx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#tx_style.,
140 )))
141 .blockrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]block().(Blockrust-analyzer cargo ratatui-widgets 0.3.2 block/Block#::defaultrust-analyzer cargo ratatui-widgets 0.3.2 block/impl#[`Block<'a>`][Default]default().()),
142 col2_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
143 );
144 f.render_widgetrust-analyzer cargo ratatui-core 0.1.2 terminal/frame/impl#[`Frame<'_>`]render_widget().(
145 Paragraphrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/Paragraph#::newrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]new().(Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(
146 avg_rx_packet_size_label,
147 self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..total_rx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#total_rx_style.,
148 )))
149 .blockrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]block().(Blockrust-analyzer cargo ratatui-widgets 0.3.2 block/Block#::defaultrust-analyzer cargo ratatui-widgets 0.3.2 block/impl#[`Block<'a>`][Default]default().()),
150 col2_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
151 );
152 f.render_widgetrust-analyzer cargo ratatui-core 0.1.2 terminal/frame/impl#[`Frame<'_>`]render_widget().(
153 Paragraphrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/Paragraph#::newrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]new().(Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(
154 avg_tx_packet_size_label,
155 self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..total_tx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#total_tx_style.,
156 )))
157 .blockrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]block().(Blockrust-analyzer cargo ratatui-widgets 0.3.2 block/Block#::defaultrust-analyzer cargo ratatui-widgets 0.3.2 block/impl#[`Block<'a>`][Default]default().()),
158 col2_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().3]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
159 );
160 } else {
161 // Horizontal 4-column layout
162 let constraints = [
163 Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(25),
164 Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(25),
165 Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(25),
166 Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(25),
167 ];
168
169 let divided_loc = Layoutrust-analyzer cargo ratatui-core 0.1.2 layout/layout/Layout#::defaultrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout][Default]default().()
170 .directionrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]direction().(Directionrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#::Horizontalrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#Horizontal#)
171 .constraintsrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]constraints().(constraints)
172 .splitrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]split().(draw_loc);
173
174 // Column 1: RX/TX
175 let col1_loc = Layoutrust-analyzer cargo ratatui-core 0.1.2 layout/layout/Layout#::defaultrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout][Default]default().()
176 .directionrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]direction().(Directionrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#::Horizontalrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#Horizontal#)
177 .constraintsrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]constraints().([Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(100)])
178 .horizontal_marginrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]horizontal_margin().(1)
179 .splitrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]split().(divided_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().);
180 let col1_text = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
181 Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(rx_label, self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..rx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#rx_style.)),
182 Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(tx_label, self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..tx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#tx_style.)),
183 ];
184 f.render_widgetrust-analyzer cargo ratatui-core 0.1.2 terminal/frame/impl#[`Frame<'_>`]render_widget().(
185 Paragraphrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/Paragraph#::newrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]new().(col1_text).blockrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]block().(Blockrust-analyzer cargo ratatui-widgets 0.3.2 block/Block#::defaultrust-analyzer cargo ratatui-widgets 0.3.2 block/impl#[`Block<'a>`][Default]default().()),
186 col1_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
187 );
188
189 // Column 2: Total RX/TX
190 let col2_loc = Layoutrust-analyzer cargo ratatui-core 0.1.2 layout/layout/Layout#::defaultrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout][Default]default().()
191 .directionrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]direction().(Directionrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#::Horizontalrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#Horizontal#)
192 .constraintsrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]constraints().([Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(100)])
193 .horizontal_marginrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]horizontal_margin().(1)
194 .splitrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]split().(divided_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().);
195 let col2_text = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
196 Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(total_rx_label, self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..total_rx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#total_rx_style.)),
197 Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(total_tx_label, self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..total_tx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#total_tx_style.)),
198 ];
199 f.render_widgetrust-analyzer cargo ratatui-core 0.1.2 terminal/frame/impl#[`Frame<'_>`]render_widget().(
200 Paragraphrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/Paragraph#::newrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]new().(col2_text).blockrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]block().(Blockrust-analyzer cargo ratatui-widgets 0.3.2 block/Block#::defaultrust-analyzer cargo ratatui-widgets 0.3.2 block/impl#[`Block<'a>`][Default]default().()),
201 col2_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
202 );
203
204 // Column 3: RX/TX packets
205 let col3_loc = Layoutrust-analyzer cargo ratatui-core 0.1.2 layout/layout/Layout#::defaultrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout][Default]default().()
206 .directionrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]direction().(Directionrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#::Horizontalrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#Horizontal#)
207 .constraintsrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]constraints().([Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(100)])
208 .horizontal_marginrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]horizontal_margin().(1)
209 .splitrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]split().(divided_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().);
210 let col3_text = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
211 Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(rx_packet_rate_label, self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..rx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#rx_style.)),
212 Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(tx_packet_rate_label, self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..tx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#tx_style.)),
213 ];
214 f.render_widgetrust-analyzer cargo ratatui-core 0.1.2 terminal/frame/impl#[`Frame<'_>`]render_widget().(
215 Paragraphrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/Paragraph#::newrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]new().(col3_text).blockrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]block().(Blockrust-analyzer cargo ratatui-widgets 0.3.2 block/Block#::defaultrust-analyzer cargo ratatui-widgets 0.3.2 block/impl#[`Block<'a>`][Default]default().()),
216 col3_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
217 );
218
219 // Column 4: AVG RX/TX packets
220 let col4_loc = Layoutrust-analyzer cargo ratatui-core 0.1.2 layout/layout/Layout#::defaultrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout][Default]default().()
221 .directionrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]direction().(Directionrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#::Horizontalrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#Horizontal#)
222 .constraintsrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]constraints().([Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(100)])
223 .horizontal_marginrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]horizontal_margin().(1)
224 .splitrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]split().(divided_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().3]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().);
225 let col4_text = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
226 Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(
227 avg_rx_packet_size_label,
228 self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..total_rx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#total_rx_style.,
229 )),
230 Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(
231 avg_tx_packet_size_label,
232 self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..total_tx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#total_tx_style.,
233 )),
234 ];
235 f.render_widgetrust-analyzer cargo ratatui-core 0.1.2 terminal/frame/impl#[`Frame<'_>`]render_widget().(
236 Paragraphrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/Paragraph#::newrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]new().(col4_text).blockrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]block().(Blockrust-analyzer cargo ratatui-widgets 0.3.2 block/Block#::defaultrust-analyzer cargo ratatui-widgets 0.3.2 block/impl#[`Block<'a>`][Default]default().()),
237 col4_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
238 );
239 }
240 } else {
241 // No packets, 2-column layout
242 let constraints = [Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(50), Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(50)];
243
244 let divided_loc = Layoutrust-analyzer cargo ratatui-core 0.1.2 layout/layout/Layout#::defaultrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout][Default]default().()
245 .directionrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]direction().(Directionrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#::Horizontalrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#Horizontal#)
246 .constraintsrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]constraints().(constraints)
247 .splitrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]split().(draw_loc);
248
249 // Column 1: RX/TX
250 let col1_loc = Layoutrust-analyzer cargo ratatui-core 0.1.2 layout/layout/Layout#::defaultrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout][Default]default().()
251 .directionrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]direction().(Directionrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#::Horizontalrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#Horizontal#)
252 .constraintsrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]constraints().([Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(100)])
253 .horizontal_marginrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]horizontal_margin().(1)
254 .splitrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]split().(divided_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().);
255 let col1_text = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
256 Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(rx_label, self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..rx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#rx_style.)),
257 Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(tx_label, self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..tx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#tx_style.)),
258 ];
259 f.render_widgetrust-analyzer cargo ratatui-core 0.1.2 terminal/frame/impl#[`Frame<'_>`]render_widget().(
260 Paragraphrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/Paragraph#::newrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]new().(col1_text).blockrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]block().(Blockrust-analyzer cargo ratatui-widgets 0.3.2 block/Block#::defaultrust-analyzer cargo ratatui-widgets 0.3.2 block/impl#[`Block<'a>`][Default]default().()),
261 col1_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
262 );
263
264 // Column 2: Total RX/TX
265 let col2_loc = Layoutrust-analyzer cargo ratatui-core 0.1.2 layout/layout/Layout#::defaultrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout][Default]default().()
266 .directionrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]direction().(Directionrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#::Horizontalrust-analyzer cargo ratatui-core 0.1.2 layout/direction/Direction#Horizontal#)
267 .constraintsrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]constraints().([Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Percentagerust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Percentage#(100)])
268 .horizontal_marginrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]horizontal_margin().(1)
269 .splitrust-analyzer cargo ratatui-core 0.1.2 layout/layout/impl#[Layout]split().(divided_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().);
270 let col2_text = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
271 Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(total_rx_label, self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..total_rx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#total_rx_style.)),
272 Linerust-analyzer cargo ratatui-core 0.1.2 text/line/Line#::fromrust-analyzer cargo ratatui-core 0.1.2 text/line/impl#[`Line<'a>`][`From<Span<'a>>`]from().(Spanrust-analyzer cargo ratatui-core 0.1.2 text/span/Span#::styledrust-analyzer cargo ratatui-core 0.1.2 text/span/impl#[`Span<'a>`]styled().(total_tx_label, self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..total_tx_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#total_tx_style.)),
273 ];
274 f.render_widgetrust-analyzer cargo ratatui-core 0.1.2 terminal/frame/impl#[`Frame<'_>`]render_widget().(
275 Paragraphrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/Paragraph#::newrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]new().(col2_text).blockrust-analyzer cargo ratatui-widgets 0.3.2 paragraph/impl#[`Paragraph<'a>`]block().(Blockrust-analyzer cargo ratatui-widgets 0.3.2 block/Block#::defaultrust-analyzer cargo ratatui-widgets 0.3.2 block/impl#[`Block<'a>`][Default]default().()),
276 col2_loc[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
277 );
278 }
279
280 // Update draw loc in widget map
281 if app_state.should_get_widget_boundsrust-analyzer cargo bottom 0.14.9 app/impl#[App]should_get_widget_bounds().()
282 && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(widget) = app_state.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&widget_id)
283 {
284 widget.top_left_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#top_left_corner. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((draw_loc.xrust-analyzer cargo ratatui-core 0.1.2 layout/rect/Rect#x., draw_loc.yrust-analyzer cargo ratatui-core 0.1.2 layout/rect/Rect#y.));
285 widget.bottom_right_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#bottom_right_corner. =
286 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((draw_loc.xrust-analyzer cargo ratatui-core 0.1.2 layout/rect/Rect#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().draw_loc.widthrust-analyzer cargo ratatui-core 0.1.2 layout/rect/Rect#width., draw_loc.yrust-analyzer cargo ratatui-core 0.1.2 layout/rect/Rect#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().draw_loc.heightrust-analyzer cargo ratatui-core 0.1.2 layout/rect/Rect#height.));
287 }
288 }
289 }