| 1 | use rustc_hashrust-analyzer cargo rustc-hash 2.1.3 crate/::FxHashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap# as HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#; |
| 2 | |
| 3 | use craterust-analyzer cargo bottom 0.14.9 crate/::{ |
| 4 | apprust-analyzer cargo bottom 0.14.9 app/::layout_managerrust-analyzer cargo bottom 0.14.9 app/layout_manager/::BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#, |
| 5 | constantsrust-analyzer cargo bottom 0.14.9 constants/, |
| 6 | utilsrust-analyzer cargo bottom 0.14.9 utils/::inputrust-analyzer cargo bottom 0.14.9 utils/input/::InputFieldStaterust-analyzer cargo bottom 0.14.9 utils/input/InputFieldState#, |
| 7 | widgetsrust-analyzer cargo bottom 0.14.9 widgets/::{ |
| 8 | BatteryWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/battery_info/BatteryWidgetState#, CpuWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#, DiskIoGraphWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/disk_io_graph/DiskIoGraphWidgetState#, DiskTableWidgetrust-analyzer cargo bottom 0.14.9 widgets/disk_table/DiskTableWidget#, |
| 9 | MemWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/mem_graph/MemWidgetState#, NetWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/network_graph/NetWidgetState#, ProcWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#, TempGraphWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/temperature_graph/TempGraphWidgetState#, TempWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetState#, |
| 10 | queryrust-analyzer cargo bottom 0.14.9 widgets/process_table/query/::ProcessQueryrust-analyzer cargo bottom 0.14.9 widgets/process_table/query/ProcessQuery#, |
| 11 | }, |
| 12 | }; |
| 13 | |
| 14 | pub struct AppWidgetStatesrust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates# { |
| 15 | pub cpu_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#cpu_state.: CpuStaterust-analyzer cargo bottom 0.14.9 app/states/CpuState#, |
| 16 | pub mem_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#mem_state.: MemStaterust-analyzer cargo bottom 0.14.9 app/states/MemState#, |
| 17 | pub net_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#net_state.: NetStaterust-analyzer cargo bottom 0.14.9 app/states/NetState#, |
| 18 | pub proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state.: ProcStaterust-analyzer cargo bottom 0.14.9 app/states/ProcState#, |
| 19 | pub temp_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#temp_state.: TempStaterust-analyzer cargo bottom 0.14.9 app/states/TempState#, |
| 20 | pub temp_graph_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#temp_graph_state.: TempGraphStatesrust-analyzer cargo bottom 0.14.9 app/states/TempGraphStates#, |
| 21 | pub disk_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_state.: DiskStaterust-analyzer cargo bottom 0.14.9 app/states/DiskState#, |
| 22 | pub disk_io_graph_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_io_graph_state.: DiskIoGraphStatesrust-analyzer cargo bottom 0.14.9 app/states/DiskIoGraphStates#, |
| 23 | pub battery_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#battery_state.: AppBatteryStaterust-analyzer cargo bottom 0.14.9 app/states/AppBatteryState#, |
| 24 | pub basic_table_widget_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#basic_table_widget_state.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<BasicTableWidgetStaterust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#>, |
| 25 | } |
| 26 | |
| 27 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)] |
| 28 | pub enum CursorDirectionrust-analyzer cargo bottom 0.14.9 app/states/CursorDirection# { |
| 29 | Leftrust-analyzer cargo bottom 0.14.9 app/states/CursorDirection#Left#, |
| 30 | Rightrust-analyzer cargo bottom 0.14.9 app/states/CursorDirection#Right#, |
| 31 | } |
| 32 | |
| 33 | pub struct AppHelpDialogStaterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState# { |
| 34 | pub is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help.: bool, |
| 35 | pub heightrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#height.: u16, |
| 36 | pub scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state.: ParagraphScrollStaterust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#, |
| 37 | pub index_shortcutsrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#index_shortcuts.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u16>, |
| 38 | is_searchingrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_searching.: bool, |
| 39 | pub search_input_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#search_input_state.: InputFieldStaterust-analyzer cargo bottom 0.14.9 utils/input/InputFieldState#, |
| 40 | } |
| 41 | |
| 42 | impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for AppHelpDialogStaterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState# { |
| 43 | fn defaultrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState][Default]default().() -> Selfrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState][Default] { |
| 44 | AppHelpDialogStaterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState# { |
| 45 | is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help.: false, |
| 46 | heightrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#height.: 0, |
| 47 | scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state.: ParagraphScrollStaterust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#::defaultrust-analyzer cargo bottom 0.14.9 app/states/impl#[ParagraphScrollState][Default]default().(), |
| 48 | index_shortcutsrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#index_shortcuts.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0; constantsrust-analyzer cargo bottom 0.14.9 constants/::HELP_TEXTrust-analyzer cargo bottom 0.14.9 constants/HELP_TEXT..lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().()], |
| 49 | is_searchingrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_searching.: false, |
| 50 | search_input_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#search_input_state.: InputFieldStaterust-analyzer cargo bottom 0.14.9 utils/input/InputFieldState#::defaultrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState][Default]default().(), |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | impl AppHelpDialogStaterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState# { |
| 56 | pub fn is_searchingrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]is_searching().(&self) -> bool { |
| 57 | self.is_searchingrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_searching. |
| 58 | } |
| 59 | |
| 60 | pub fn is_help_searchingrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]is_help_searching().(&self) -> bool { |
| 61 | self.is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. && self.is_searchingrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_searching. |
| 62 | } |
| 63 | |
| 64 | pub fn open_searchrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]open_search().(&mut self) { |
| 65 | self.is_searchingrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_searching. = true; |
| 66 | } |
| 67 | |
| 68 | pub fn close_searchrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]close_search().(&mut self) { |
| 69 | self.is_searchingrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_searching. = false; |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | /// AppSearchState deals with generic searching (I might do this in the future). |
| 74 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)] |
| 75 | pub struct AppSearchStaterust-analyzer cargo bottom 0.14.9 app/states/AppSearchState# { |
| 76 | pub is_enabledrust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#is_enabled.: bool, |
| 77 | pub is_invalid_searchrust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#is_invalid_search.: bool, |
| 78 | pub input_field_staterust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#input_field_state.: InputFieldStaterust-analyzer cargo bottom 0.14.9 utils/input/InputFieldState#, |
| 79 | |
| 80 | /// The query. TODO: Merge this as one enum. |
| 81 | pub queryrust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#query.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<ProcessQueryrust-analyzer cargo bottom 0.14.9 widgets/process_table/query/ProcessQuery#>, |
| 82 | pub error_messagerust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#error_message.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 83 | } |
| 84 | |
| 85 | impl AppSearchStaterust-analyzer cargo bottom 0.14.9 app/states/AppSearchState# { |
| 86 | /// Resets the [`AppSearchState`] to its default state, albeit still |
| 87 | /// enabled. |
| 88 | pub fn resetrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppSearchState]reset().(&mut self) { |
| 89 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = AppSearchStaterust-analyzer cargo bottom 0.14.9 app/states/AppSearchState# { |
| 90 | is_enabledrust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#is_enabled.: self.is_enabledrust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#is_enabled., |
| 91 | ..AppSearchStaterust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#::defaultrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppSearchState][Default]default().() |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | /// Returns whether the [`AppSearchState`] has an invalid or blank search. |
| 96 | pub fn is_invalid_or_blank_searchrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppSearchState]is_invalid_or_blank_search().(&self) -> bool { |
| 97 | self.input_field_staterust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#input_field_state..current_queryrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]current_query().().is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]is_empty().() || self.is_invalid_searchrust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#is_invalid_search. |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | pub struct ProcStaterust-analyzer cargo bottom 0.14.9 app/states/ProcState# { |
| 102 | pub widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states.: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, ProcWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#>, |
| 103 | } |
| 104 | |
| 105 | impl ProcStaterust-analyzer cargo bottom 0.14.9 app/states/ProcState# { |
| 106 | pub fn initrust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]init().(widget_states: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, ProcWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#>) -> Selfrust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState] { |
| 107 | ProcStaterust-analyzer cargo bottom 0.14.9 app/states/ProcState# { widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. } |
| 108 | } |
| 109 | |
| 110 | pub fn get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(&mut self, widget_id: u64) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&mut ProcWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#> { |
| 111 | self.widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#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) |
| 112 | } |
| 113 | |
| 114 | pub fn get_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_widget_state().(&self, widget_id: u64) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&ProcWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#> { |
| 115 | self.widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&widget_id) |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | pub struct NetStaterust-analyzer cargo bottom 0.14.9 app/states/NetState# { |
| 120 | pub widget_statesrust-analyzer cargo bottom 0.14.9 app/states/NetState#widget_states.: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, NetWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/network_graph/NetWidgetState#>, |
| 121 | } |
| 122 | |
| 123 | impl NetStaterust-analyzer cargo bottom 0.14.9 app/states/NetState# { |
| 124 | pub fn initrust-analyzer cargo bottom 0.14.9 app/states/impl#[NetState]init().(widget_states: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, NetWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/network_graph/NetWidgetState#>) -> Selfrust-analyzer cargo bottom 0.14.9 app/states/impl#[NetState] { |
| 125 | NetStaterust-analyzer cargo bottom 0.14.9 app/states/NetState# { widget_statesrust-analyzer cargo bottom 0.14.9 app/states/NetState#widget_states. } |
| 126 | } |
| 127 | |
| 128 | pub fn get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[NetState]get_mut_widget_state().(&mut self, widget_id: u64) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&mut NetWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/network_graph/NetWidgetState#> { |
| 129 | self.widget_statesrust-analyzer cargo bottom 0.14.9 app/states/NetState#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) |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | pub struct CpuStaterust-analyzer cargo bottom 0.14.9 app/states/CpuState# { |
| 134 | pub widget_statesrust-analyzer cargo bottom 0.14.9 app/states/CpuState#widget_states.: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, CpuWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#>, |
| 135 | } |
| 136 | |
| 137 | impl CpuStaterust-analyzer cargo bottom 0.14.9 app/states/CpuState# { |
| 138 | pub fn initrust-analyzer cargo bottom 0.14.9 app/states/impl#[CpuState]init().(widget_states: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, CpuWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#>) -> Selfrust-analyzer cargo bottom 0.14.9 app/states/impl#[CpuState] { |
| 139 | CpuStaterust-analyzer cargo bottom 0.14.9 app/states/CpuState# { widget_statesrust-analyzer cargo bottom 0.14.9 app/states/CpuState#widget_states. } |
| 140 | } |
| 141 | |
| 142 | pub fn get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[CpuState]get_mut_widget_state().(&mut self, widget_id: u64) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&mut CpuWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#> { |
| 143 | self.widget_statesrust-analyzer cargo bottom 0.14.9 app/states/CpuState#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) |
| 144 | } |
| 145 | |
| 146 | pub fn get_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[CpuState]get_widget_state().(&self, widget_id: u64) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&CpuWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#> { |
| 147 | self.widget_statesrust-analyzer cargo bottom 0.14.9 app/states/CpuState#widget_states..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&widget_id) |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | pub struct MemStaterust-analyzer cargo bottom 0.14.9 app/states/MemState# { |
| 152 | pub widget_statesrust-analyzer cargo bottom 0.14.9 app/states/MemState#widget_states.: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, MemWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/mem_graph/MemWidgetState#>, |
| 153 | } |
| 154 | |
| 155 | impl MemStaterust-analyzer cargo bottom 0.14.9 app/states/MemState# { |
| 156 | pub fn initrust-analyzer cargo bottom 0.14.9 app/states/impl#[MemState]init().(widget_states: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, MemWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/mem_graph/MemWidgetState#>) -> Selfrust-analyzer cargo bottom 0.14.9 app/states/impl#[MemState] { |
| 157 | MemStaterust-analyzer cargo bottom 0.14.9 app/states/MemState# { widget_statesrust-analyzer cargo bottom 0.14.9 app/states/MemState#widget_states. } |
| 158 | } |
| 159 | |
| 160 | pub fn get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[MemState]get_mut_widget_state().(&mut self, widget_id: u64) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&mut MemWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/mem_graph/MemWidgetState#> { |
| 161 | self.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) |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | pub struct TempStaterust-analyzer cargo bottom 0.14.9 app/states/TempState# { |
| 166 | pub widget_statesrust-analyzer cargo bottom 0.14.9 app/states/TempState#widget_states.: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, TempWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetState#>, |
| 167 | } |
| 168 | |
| 169 | impl TempStaterust-analyzer cargo bottom 0.14.9 app/states/TempState# { |
| 170 | pub fn initrust-analyzer cargo bottom 0.14.9 app/states/impl#[TempState]init().(widget_states: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, TempWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetState#>) -> Selfrust-analyzer cargo bottom 0.14.9 app/states/impl#[TempState] { |
| 171 | TempStaterust-analyzer cargo bottom 0.14.9 app/states/TempState# { widget_statesrust-analyzer cargo bottom 0.14.9 app/states/TempState#widget_states. } |
| 172 | } |
| 173 | |
| 174 | pub fn get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[TempState]get_mut_widget_state().(&mut self, widget_id: u64) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&mut TempWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetState#> { |
| 175 | self.widget_statesrust-analyzer cargo bottom 0.14.9 app/states/TempState#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) |
| 176 | } |
| 177 | |
| 178 | pub fn get_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[TempState]get_widget_state().(&self, widget_id: u64) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&TempWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetState#> { |
| 179 | self.widget_statesrust-analyzer cargo bottom 0.14.9 app/states/TempState#widget_states..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&widget_id) |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | pub struct TempGraphStatesrust-analyzer cargo bottom 0.14.9 app/states/TempGraphStates# { |
| 184 | pub widget_statesrust-analyzer cargo bottom 0.14.9 app/states/TempGraphStates#widget_states.: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, TempGraphWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/temperature_graph/TempGraphWidgetState#>, |
| 185 | } |
| 186 | |
| 187 | impl TempGraphStatesrust-analyzer cargo bottom 0.14.9 app/states/TempGraphStates# { |
| 188 | pub fn initrust-analyzer cargo bottom 0.14.9 app/states/impl#[TempGraphStates]init().(widget_states: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, TempGraphWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/temperature_graph/TempGraphWidgetState#>) -> Selfrust-analyzer cargo bottom 0.14.9 app/states/impl#[TempGraphStates] { |
| 189 | TempGraphStatesrust-analyzer cargo bottom 0.14.9 app/states/TempGraphStates# { widget_statesrust-analyzer cargo bottom 0.14.9 app/states/TempGraphStates#widget_states. } |
| 190 | } |
| 191 | |
| 192 | pub fn get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[TempGraphStates]get_mut_widget_state().(&mut self, widget_id: u64) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&mut TempGraphWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/temperature_graph/TempGraphWidgetState#> { |
| 193 | self.widget_statesrust-analyzer cargo bottom 0.14.9 app/states/TempGraphStates#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) |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | /// Holds per-widget state for all disk I/O graph instances in the layout. |
| 198 | pub struct DiskIoGraphStatesrust-analyzer cargo bottom 0.14.9 app/states/DiskIoGraphStates# { |
| 199 | pub widget_statesrust-analyzer cargo bottom 0.14.9 app/states/DiskIoGraphStates#widget_states.: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, DiskIoGraphWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/disk_io_graph/DiskIoGraphWidgetState#>, |
| 200 | } |
| 201 | |
| 202 | impl DiskIoGraphStatesrust-analyzer cargo bottom 0.14.9 app/states/DiskIoGraphStates# { |
| 203 | pub fn initrust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskIoGraphStates]init().(widget_states: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, DiskIoGraphWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/disk_io_graph/DiskIoGraphWidgetState#>) -> Selfrust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskIoGraphStates] { |
| 204 | DiskIoGraphStatesrust-analyzer cargo bottom 0.14.9 app/states/DiskIoGraphStates# { widget_statesrust-analyzer cargo bottom 0.14.9 app/states/DiskIoGraphStates#widget_states. } |
| 205 | } |
| 206 | |
| 207 | pub fn get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskIoGraphStates]get_mut_widget_state().(&mut self, widget_id: u64) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&mut DiskIoGraphWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/disk_io_graph/DiskIoGraphWidgetState#> { |
| 208 | self.widget_statesrust-analyzer cargo bottom 0.14.9 app/states/DiskIoGraphStates#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) |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | pub struct DiskStaterust-analyzer cargo bottom 0.14.9 app/states/DiskState# { |
| 213 | pub widget_statesrust-analyzer cargo bottom 0.14.9 app/states/DiskState#widget_states.: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, DiskTableWidgetrust-analyzer cargo bottom 0.14.9 widgets/disk_table/DiskTableWidget#>, |
| 214 | } |
| 215 | |
| 216 | impl DiskStaterust-analyzer cargo bottom 0.14.9 app/states/DiskState# { |
| 217 | pub fn initrust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState]init().(widget_states: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, DiskTableWidgetrust-analyzer cargo bottom 0.14.9 widgets/disk_table/DiskTableWidget#>) -> Selfrust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState] { |
| 218 | DiskStaterust-analyzer cargo bottom 0.14.9 app/states/DiskState# { widget_statesrust-analyzer cargo bottom 0.14.9 app/states/DiskState#widget_states. } |
| 219 | } |
| 220 | |
| 221 | pub fn get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState]get_mut_widget_state().(&mut self, widget_id: u64) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&mut DiskTableWidgetrust-analyzer cargo bottom 0.14.9 widgets/disk_table/DiskTableWidget#> { |
| 222 | self.widget_statesrust-analyzer cargo bottom 0.14.9 app/states/DiskState#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) |
| 223 | } |
| 224 | |
| 225 | pub fn get_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState]get_widget_state().(&self, widget_id: u64) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&DiskTableWidgetrust-analyzer cargo bottom 0.14.9 widgets/disk_table/DiskTableWidget#> { |
| 226 | self.widget_statesrust-analyzer cargo bottom 0.14.9 app/states/DiskState#widget_states..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&widget_id) |
| 227 | } |
| 228 | } |
| 229 | pub struct BasicTableWidgetStaterust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState# { |
| 230 | // Since this is intended (currently) to only be used for ONE widget, that's |
| 231 | // how it's going to be written. If we want to allow for multiple of these, |
| 232 | // then we can expand outwards with a normal BasicTableState and a hashmap |
| 233 | pub currently_displayed_widget_typerust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#currently_displayed_widget_type.: BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#, |
| 234 | pub currently_displayed_widget_idrust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#currently_displayed_widget_id.: u64, |
| 235 | pub left_tlcrust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#left_tlc.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<(u16, u16)>, |
| 236 | pub left_brcrust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#left_brc.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<(u16, u16)>, |
| 237 | pub right_tlcrust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#right_tlc.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<(u16, u16)>, |
| 238 | pub right_brcrust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#right_brc.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<(u16, u16)>, |
| 239 | } |
| 240 | |
| 241 | pub struct AppBatteryStaterust-analyzer cargo bottom 0.14.9 app/states/AppBatteryState# { |
| 242 | pub widget_statesrust-analyzer cargo bottom 0.14.9 app/states/AppBatteryState#widget_states.: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, BatteryWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/battery_info/BatteryWidgetState#>, |
| 243 | } |
| 244 | |
| 245 | impl AppBatteryStaterust-analyzer cargo bottom 0.14.9 app/states/AppBatteryState# { |
| 246 | pub fn initrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppBatteryState]init().(widget_states: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, BatteryWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/battery_info/BatteryWidgetState#>) -> Selfrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppBatteryState] { |
| 247 | AppBatteryStaterust-analyzer cargo bottom 0.14.9 app/states/AppBatteryState# { widget_statesrust-analyzer cargo bottom 0.14.9 app/states/AppBatteryState#widget_states. } |
| 248 | } |
| 249 | |
| 250 | pub fn get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[AppBatteryState]get_mut_widget_state().(&mut self, widget_id: u64) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&mut BatteryWidgetStaterust-analyzer cargo bottom 0.14.9 widgets/battery_info/BatteryWidgetState#> { |
| 251 | self.widget_statesrust-analyzer cargo bottom 0.14.9 app/states/AppBatteryState#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) |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)] |
| 256 | pub struct ParagraphScrollStaterust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState# { |
| 257 | pub current_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#current_scroll_index.: u16, |
| 258 | pub max_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#max_scroll_index.: u16, |
| 259 | } |