pub struct AppState {
pub db: Arc<MenteDb>,
pub databases: Arc<Databases>,
pub verifier: Option<Arc<TokenVerifier>>,
pub spaces: Arc<RwLock<SpaceManager>>,
pub jwt_secret: Option<String>,
pub admin_key: Option<String>,
pub start_time: Instant,
pub extraction_config: Option<ExtractionConfig>,
pub auto_extract: bool,
pub extraction_tx: Option<ExtractionSender>,
pub cluster: Option<Cluster>,
pub turn_trackers: Arc<Mutex<HashMap<String, DeltaTracker>>>,
}Fields§
§db: Arc<MenteDb>The default database (data directory root). Same handle as
databases.default_db(); kept for the gRPC, WebSocket and metrics
paths, which serve the default database only.
databases: Arc<Databases>The default database plus the named per-tenant ones.
verifier: Option<Arc<TokenVerifier>>Checks bearer tokens. None disables auth (development mode).
spaces: Arc<RwLock<SpaceManager>>§jwt_secret: Option<String>HS256 secret for issuing tokens at /v1/auth/token. Unset when tokens are verified with a public key only.
admin_key: Option<String>§start_time: Instant§extraction_config: Option<ExtractionConfig>Extraction pipeline configuration. None means no LLM provider configured.
auto_extract: boolWhen true, storing a conversation-type memory auto-runs extraction.
extraction_tx: Option<ExtractionSender>Bounded channel sender for the background extraction worker.
cluster: Option<Cluster>Self-organizing sharding handle. None unless MENTEDB_SHARDING is set.
turn_trackers: Arc<Mutex<HashMap<String, DeltaTracker>>>Per-agent delta trackers for /v1/process_turn, so delta-aware context
serving (only what changed since the agent’s last turn) works across
requests instead of resetting every call.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AppState
impl !UnwindSafe for AppState
impl Freeze 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request