pub struct AppState {
pub conn: Mutex<Connection>,
pub embedding_client: Option<Arc<dyn EmbeddingClient>>,
pub embedding_model: Option<String>,
}Expand description
Shared application state passed to all handlers.
Fields§
§conn: Mutex<Connection>SQLite connection wrapped in a sync mutex.
embedding_client: Option<Arc<dyn EmbeddingClient>>Optional async embedding client. When Some, write-path handlers
compute an embedding for each new/updated node and /search
runs hybrid (FTS + vector) ranking. None short-circuits to
FTS-only with no embeddings rows written.
embedding_model: Option<String>Model name stamped into the embeddings.model column when a
client is configured. None is equivalent to no client (no
embedding row is written).
Auto Trait Implementations§
impl !Freeze for AppState
impl !RefUnwindSafe for AppState
impl !UnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more