Refactor the server
This commit is contained in:
parent
3b9ad11d71
commit
01ec17ff04
15 changed files with 939 additions and 1226 deletions
12
server-rs/src/state.rs
Normal file
12
server-rs/src/state.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
use crate::data::{POIData, PropertyData};
|
||||
use crate::index::GridIndex;
|
||||
|
||||
pub struct AppState {
|
||||
pub data: PropertyData,
|
||||
pub grid: GridIndex,
|
||||
/// h3_cells[resolution][row_idx] = precomputed H3 cell ID.
|
||||
/// Empty Vec for resolutions not precomputed.
|
||||
pub h3_cells: Vec<Vec<u64>>,
|
||||
pub poi_data: POIData,
|
||||
pub poi_grid: GridIndex,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue