| 1 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::timerust-analyzer cargo std https://github.com/rust-lang/rust/library/std time/::Instantrust-analyzer cargo std https://github.com/rust-lang/rust/library/std time/Instant#; |
| 2 | |
| 3 | use ratatuirust-analyzer cargo ratatui 0.30.2 crate/::{ |
| 4 | Framerust-analyzer cargo ratatui-core 0.1.2 terminal/frame/Frame#, |
| 5 | layoutrust-analyzer cargo ratatui-core 0.1.2 layout/::{Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#, Rectrust-analyzer cargo ratatui-core 0.1.2 layout/rect/Rect#}, |
| 6 | stylerust-analyzer cargo ratatui-core 0.1.2 style/::Stylerust-analyzer cargo ratatui-core 0.1.2 style/Style#, |
| 7 | }; |
| 8 | |
| 9 | use craterust-analyzer cargo bottom 0.14.9 crate/::{ |
| 10 | apprust-analyzer cargo bottom 0.14.9 app/::{Apprust-analyzer cargo bottom 0.14.9 app/App#, datarust-analyzer cargo bottom 0.14.9 app/data/::Valuesrust-analyzer cargo bottom 0.14.9 app/data/time_series/Values#}, |
| 11 | canvasrust-analyzer cargo bottom 0.14.9 canvas/::{ |
| 12 | Painterrust-analyzer cargo bottom 0.14.9 canvas/Painter#, |
| 13 | componentsrust-analyzer cargo bottom 0.14.9 canvas/components/::time_seriesrust-analyzer cargo bottom 0.14.9 canvas/components/time_series/::{GraphDatarust-analyzer cargo bottom 0.14.9 canvas/components/time_series/base/GraphData#, LegendConstraintsrust-analyzer cargo bottom 0.14.9 canvas/components/time_series/base/LegendConstraints#}, |
| 14 | drawing_utilsrust-analyzer cargo bottom 0.14.9 canvas/drawing_utils/::should_hide_x_labelrust-analyzer cargo bottom 0.14.9 canvas/drawing_utils/should_hide_x_label()., |
| 15 | }, |
| 16 | collectionrust-analyzer cargo bottom 0.14.9 collection/::memoryrust-analyzer cargo bottom 0.14.9 collection/memory/::MemDatarust-analyzer cargo bottom 0.14.9 collection/memory/MemData#, |
| 17 | componentsrust-analyzer cargo bottom 0.14.9 components/::time_seriesrust-analyzer cargo bottom 0.14.9 components/time_series/::GraphDrawCtxrust-analyzer cargo bottom 0.14.9 components/time_series/GraphDrawCtx#, |
| 18 | get_binary_unit_and_denominatorrust-analyzer cargo bottom 0.14.9 utils/conversion/get_binary_unit_and_denominator()., |
| 19 | }; |
| 20 | |
| 21 | /// Convert memory info into a combined memory label. |
| 22 | #[inline] |
| 23 | fn memory_legend_labelrust-analyzer cargo bottom 0.14.9 canvas/widgets/mem_graph/memory_legend_label().(name: &str, data: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&MemDatarust-analyzer cargo bottom 0.14.9 collection/memory/MemData#>) -> Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# { |
| 24 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(data) = data { |
| 25 | let total_bytes = data.total_bytesrust-analyzer cargo bottom 0.14.9 collection/memory/MemData#total_bytes..getrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/nonzero/impl#[`NonZero<T>`]get().(); |
| 26 | let percentage = data.used_bytesrust-analyzer cargo bottom 0.14.9 collection/memory/MemData#used_bytes. as f64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().total_bytes as f64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().100.0; |
| 27 | let (unit, denominator) = get_binary_unit_and_denominatorrust-analyzer cargo bottom 0.14.9 utils/conversion/get_binary_unit_and_denominator().(total_bytes); |
| 28 | let used = data.used_bytesrust-analyzer cargo bottom 0.14.9 collection/memory/MemData#used_bytes. as f64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().denominator; |
| 29 | let total = total_bytes as f64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().denominator; |
| 30 | |
| 31 | formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{name}:{percentage:3.0}% {used:.1}{unit}/{total:.1}{unit}") |
| 32 | } else { |
| 33 | formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{name}: 0% 0.0B/0.0B") |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | /// Get graph data. |
| 38 | #[inline] |
| 39 | fn graph_datarust-analyzer cargo bottom 0.14.9 canvas/widgets/mem_graph/graph_data().<'a>( |
| 40 | out: &mut Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<GraphDatarust-analyzer cargo bottom 0.14.9 canvas/components/time_series/base/GraphData#<'a>>, name: &str, last_harvest: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a MemDatarust-analyzer cargo bottom 0.14.9 collection/memory/MemData#>, |
| 41 | time: &'a [Instantrust-analyzer cargo std https://github.com/rust-lang/rust/library/std time/Instant#], values: &'a Valuesrust-analyzer cargo bottom 0.14.9 app/data/time_series/Values#, style: Stylerust-analyzer cargo ratatui-core 0.1.2 style/Style#, |
| 42 | ) { |
| 43 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().values.no_elementsrust-analyzer cargo timeless 0.1.0 data/chunked/impl#[`ChunkedData<D>`]no_elements().() { |
| 44 | let label = memory_legend_labelrust-analyzer cargo bottom 0.14.9 canvas/widgets/mem_graph/memory_legend_label().(name, last_harvest).intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(); |
| 45 | |
| 46 | out.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().( |
| 47 | GraphDatarust-analyzer cargo bottom 0.14.9 canvas/components/time_series/base/GraphData#::defaultrust-analyzer cargo bottom 0.14.9 canvas/components/time_series/base/impl#[`GraphData<'a, F>`][Default]default().() |
| 48 | .namerust-analyzer cargo bottom 0.14.9 canvas/components/time_series/base/impl#[`GraphData<'a, F>`]name().(label) |
| 49 | .timerust-analyzer cargo bottom 0.14.9 canvas/components/time_series/base/impl#[`GraphData<'a, F>`]time().(time) |
| 50 | .valuesrust-analyzer cargo bottom 0.14.9 canvas/components/time_series/base/impl#[`GraphData<'a, F>`]values().(values) |
| 51 | .stylerust-analyzer cargo bottom 0.14.9 canvas/components/time_series/base/impl#[`GraphData<'a, F>`]style().(style), |
| 52 | ); |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | impl Painterrust-analyzer cargo bottom 0.14.9 canvas/Painter# { |
| 57 | pub fn draw_memory_graphrust-analyzer cargo bottom 0.14.9 canvas/widgets/mem_graph/impl#[Painter]draw_memory_graph().( |
| 58 | &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, |
| 59 | ) { |
| 60 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(mem_state) = app_state.statesrust-analyzer cargo bottom 0.14.9 app/App#states..mem_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#mem_state..widget_statesrust-analyzer cargo bottom 0.14.9 app/states/MemState#widget_states..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) { |
| 61 | let hide_x_labels = should_hide_x_labelrust-analyzer cargo bottom 0.14.9 canvas/drawing_utils/should_hide_x_label().( |
| 62 | app_state.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..hide_timerust-analyzer cargo bottom 0.14.9 app/AppConfigFields#hide_time., |
| 63 | app_state.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..autohide_timerust-analyzer cargo bottom 0.14.9 app/AppConfigFields#autohide_time., |
| 64 | mem_state.graphrust-analyzer cargo bottom 0.14.9 widgets/mem_graph/MemWidgetState#graph..state_mutrust-analyzer cargo bottom 0.14.9 components/time_series/percent/impl#[PercentTimeGraph]state_mut().().autohide_timer_mutrust-analyzer cargo bottom 0.14.9 components/time_series/impl#[TimeseriesState]autohide_timer_mut().(), |
| 65 | draw_loc, |
| 66 | ); |
| 67 | let graph_data = { |
| 68 | let mut size = 1; |
| 69 | let 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().(); |
| 70 | |
| 71 | // TODO: is this optimization really needed...? This just pre-allocates a vec, |
| 72 | // but it'll probably never be that big... |
| 73 | |
| 74 | if data.swap_harvestrust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#swap_harvest..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() { |
| 75 | size rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().1; // add capacity for SWAP |
| 76 | } |
| 77 | #[cfg(feature = "zfs")] |
| 78 | { |
| 79 | if data.arc_harvestrust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#arc_harvest..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() { |
| 80 | size rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().1; // add capacity for ARC |
| 81 | } |
| 82 | } |
| 83 | #[cfg(feature = "gpu")] |
| 84 | { |
| 85 | size rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().data.gpu_harvestrust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#gpu_harvest..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().(); // add row(s) for gpu |
| 86 | } |
| 87 | |
| 88 | let mut points = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::with_capacityrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]with_capacity().(size); |
| 89 | let time_series = &data.time_series_datarust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#time_series_data.; |
| 90 | let time = &time_series.timerust-analyzer cargo bottom 0.14.9 app/data/time_series/TimeSeriesData#time.; |
| 91 | |
| 92 | // TODO: Add a "no data" option here/to time graph if there is no entries |
| 93 | graph_datarust-analyzer cargo bottom 0.14.9 canvas/widgets/mem_graph/graph_data().( |
| 94 | &mut points, |
| 95 | "RAM", |
| 96 | data.ram_harvestrust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#ram_harvest..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().(), |
| 97 | time, |
| 98 | &time_series.ramrust-analyzer cargo bottom 0.14.9 app/data/time_series/TimeSeriesData#ram., |
| 99 | self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..ram_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#ram_style., |
| 100 | ); |
| 101 | |
| 102 | graph_datarust-analyzer cargo bottom 0.14.9 canvas/widgets/mem_graph/graph_data().( |
| 103 | &mut points, |
| 104 | "SWP", |
| 105 | data.swap_harvestrust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#swap_harvest..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().(), |
| 106 | time, |
| 107 | &time_series.swaprust-analyzer cargo bottom 0.14.9 app/data/time_series/TimeSeriesData#swap., |
| 108 | self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..swap_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#swap_style., |
| 109 | ); |
| 110 | |
| 111 | #[cfg(not(target_os = "windows"))] |
| 112 | { |
| 113 | graph_datarust-analyzer cargo bottom 0.14.9 canvas/widgets/mem_graph/graph_data().( |
| 114 | &mut points, |
| 115 | "CACHE", // TODO: Figure out how to line this up better |
| 116 | data.cache_harvestrust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#cache_harvest..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().(), |
| 117 | time, |
| 118 | &time_series.cache_memrust-analyzer cargo bottom 0.14.9 app/data/time_series/TimeSeriesData#cache_mem., |
| 119 | self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..cache_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#cache_style., |
| 120 | ); |
| 121 | } |
| 122 | |
| 123 | #[cfg(feature = "zfs")] |
| 124 | { |
| 125 | graph_datarust-analyzer cargo bottom 0.14.9 canvas/widgets/mem_graph/graph_data().( |
| 126 | &mut points, |
| 127 | "ARC", |
| 128 | data.arc_harvestrust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#arc_harvest..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().(), |
| 129 | time, |
| 130 | &time_series.arc_memrust-analyzer cargo bottom 0.14.9 app/data/time_series/TimeSeriesData#arc_mem., |
| 131 | self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..arc_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#arc_style., |
| 132 | ); |
| 133 | } |
| 134 | |
| 135 | #[cfg(feature = "gpu")] |
| 136 | { |
| 137 | let mut colour_index = 0; |
| 138 | let gpu_styles = &self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..gpu_coloursrust-analyzer cargo bottom 0.14.9 options/config/style/Styles#gpu_colours.; |
| 139 | let short_gpu_names = app_state.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..short_gpu_namesrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#short_gpu_names.; |
| 140 | let gpu_count = data.gpu_harvestrust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#gpu_harvest..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().(); |
| 141 | |
| 142 | for (gpu_index, (name, harvest)) in data.gpu_harvestrust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#gpu_harvest..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() { |
| 143 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(gpu_data) = data.time_series_datarust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#time_series_data..gpu_memrust-analyzer cargo bottom 0.14.9 app/data/time_series/TimeSeriesData#gpu_mem..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(name) { |
| 144 | let style = { |
| 145 | if gpu_styles.is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]is_empty().() { |
| 146 | Stylerust-analyzer cargo ratatui-core 0.1.2 style/Style#::defaultrust-analyzer cargo ratatui-core 0.1.2 style/impl#[Style][Default]default().() |
| 147 | } else { |
| 148 | let colour = gpu_styles[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().colour_index rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Rem<Self>`]rem().gpu_styles.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 149 | colour_index rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().1; |
| 150 | |
| 151 | colour |
| 152 | } |
| 153 | }; |
| 154 | |
| 155 | let display_name = if short_gpu_names { |
| 156 | if gpu_count rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().1 { |
| 157 | "GPU".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().() |
| 158 | } else { |
| 159 | formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("GPU{gpu_index}") |
| 160 | } |
| 161 | } else { |
| 162 | name.clonerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][Clone]clone().() |
| 163 | }; |
| 164 | |
| 165 | graph_datarust-analyzer cargo bottom 0.14.9 canvas/widgets/mem_graph/graph_data().( |
| 166 | &mut points, |
| 167 | &display_name, |
| 168 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(harvest), |
| 169 | time, |
| 170 | gpu_data, |
| 171 | style, |
| 172 | ); |
| 173 | } |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | points |
| 178 | }; |
| 179 | |
| 180 | let border_style = self.get_border_stylerust-analyzer cargo bottom 0.14.9 canvas/impl#[Painter]get_border_style().(widget_id, 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.); |
| 181 | let marker = self.get_markerrust-analyzer cargo bottom 0.14.9 canvas/impl#[Painter]get_marker().(app_state.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..use_dotrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#use_dot.); |
| 182 | |
| 183 | mem_state.graphrust-analyzer cargo bottom 0.14.9 widgets/mem_graph/MemWidgetState#graph..drawrust-analyzer cargo bottom 0.14.9 components/time_series/percent/impl#[PercentTimeGraph]draw().( |
| 184 | f, |
| 185 | draw_loc, |
| 186 | GraphDrawCtxrust-analyzer cargo bottom 0.14.9 components/time_series/GraphDrawCtx# { |
| 187 | titlerust-analyzer cargo bottom 0.14.9 components/time_series/GraphDrawCtx#title.: " Memory ".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(), |
| 188 | border_stylerust-analyzer cargo bottom 0.14.9 components/time_series/GraphDrawCtx#border_style., |
| 189 | title_stylerust-analyzer cargo bottom 0.14.9 components/time_series/GraphDrawCtx#title_style.: self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..widget_title_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#widget_title_style., |
| 190 | graph_stylerust-analyzer cargo bottom 0.14.9 components/time_series/GraphDrawCtx#graph_style.: self.stylesrust-analyzer cargo bottom 0.14.9 canvas/Painter#styles..graph_stylerust-analyzer cargo bottom 0.14.9 options/config/style/Styles#graph_style., |
| 191 | general_widget_stylerust-analyzer cargo bottom 0.14.9 components/time_series/GraphDrawCtx#general_widget_style.: 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., |
| 192 | border_typerust-analyzer cargo bottom 0.14.9 components/time_series/GraphDrawCtx#border_type.: 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., |
| 193 | markerrust-analyzer cargo bottom 0.14.9 components/time_series/GraphDrawCtx#marker., |
| 194 | hide_x_labelsrust-analyzer cargo bottom 0.14.9 components/time_series/GraphDrawCtx#hide_x_labels., |
| 195 | is_selectedrust-analyzer cargo bottom 0.14.9 components/time_series/GraphDrawCtx#is_selected.: 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, |
| 196 | is_expandedrust-analyzer cargo bottom 0.14.9 components/time_series/GraphDrawCtx#is_expanded.: app_state.is_expandedrust-analyzer cargo bottom 0.14.9 app/App#is_expanded., |
| 197 | legend_positionrust-analyzer cargo bottom 0.14.9 components/time_series/GraphDrawCtx#legend_position.: app_state.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..memory_legend_positionrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#memory_legend_position., |
| 198 | legend_constraintsrust-analyzer cargo bottom 0.14.9 components/time_series/GraphDrawCtx#legend_constraints.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(LegendConstraintsrust-analyzer cargo bottom 0.14.9 canvas/components/time_series/base/LegendConstraints# { |
| 199 | widthrust-analyzer cargo bottom 0.14.9 canvas/components/time_series/base/LegendConstraints#width.: Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Ratiorust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Ratio#(3, 4), |
| 200 | heightrust-analyzer cargo bottom 0.14.9 canvas/components/time_series/base/LegendConstraints#height.: Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Ratiorust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Ratio#(3, 4), |
| 201 | }), |
| 202 | }, |
| 203 | graph_data, |
| 204 | ); |
| 205 | } |
| 206 | |
| 207 | if app_state.should_get_widget_boundsrust-analyzer cargo bottom 0.14.9 app/impl#[App]should_get_widget_bounds().() { |
| 208 | // Update draw loc in widget map |
| 209 | if 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) { |
| 210 | 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.)); |
| 211 | widget.bottom_right_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#bottom_right_corner. = |
| 212 | 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.)); |
| 213 | } |
| 214 | } |
| 215 | } |
| 216 | } |