feat: add api functions and actix webserver

This commit is contained in:
2024-02-12 21:45:27 +01:00
parent af7140790c
commit c502f1da49
10 changed files with 87 additions and 38 deletions

7
src/types/app_state.rs Normal file
View File

@@ -0,0 +1,7 @@
use std::sync::Mutex;
use crate::search::engine::SearchEngine;
pub struct AppStateWithSearchEngine {
pub search_engine: Mutex<SearchEngine>, // <- Mutex is necessary to mutate safely across threads
}

1
src/types/mod.rs Normal file
View File

@@ -0,0 +1 @@
pub mod app_state;