Groups tables by their category. Returns a map from category name to list of tables in that category.
()
| 1114 | /// |
| 1115 | /// Returns a map from category name to list of tables in that category. |
| 1116 | pub fn get_tables_by_category() -> HashMap<&'static str, Vec<&'static TableInfo>> { |
| 1117 | let mut map: HashMap<&'static str, Vec<&'static TableInfo>> = HashMap::new(); |
| 1118 | for table in TABLES { |
| 1119 | map.entry(table.category).or_default().push(table); |
| 1120 | } |
| 1121 | map |
| 1122 | } |