pub struct AppState {
pub pool: SqlitePool,
pub cfg: Arc<Config>,
pub recorder: Arc<RecorderManager>,
pub mirror: Option<Arc<MirrorRecorderManager>>,
pub sampler: Arc<SamplerManager>,
pub consumers: Arc<Vec<Arc<dyn DetectionConsumer>>>,
pub modules: Arc<Vec<ModuleManifest>>,
pub catalog: Arc<CatalogService>,
pub http: Client,
pub started_at: DateTime<Utc>,
}Expand description
Shared application state, cloned cheaply into every handler and background task.
Note the kernel holds NO concrete domain engine: perception interpreters (zones, ANPR/entry, and
future apps) are registered as DetectionConsumers in consumers, so the ingest path and this
struct stay domain-agnostic. After the crate split the composing binary decides which app crates
populate the registry.
Fields§
§pool: SqlitePool§cfg: Arc<Config>§recorder: Arc<RecorderManager>§mirror: Option<Arc<MirrorRecorderManager>>Dual/mirror recorder, present only when HELDAR_MIRROR_RECORDINGS_DIR is configured.
sampler: Arc<SamplerManager>§consumers: Arc<Vec<Arc<dyn DetectionConsumer>>>Registered perception consumers, fanned out to from detection ingest.
modules: Arc<Vec<ModuleManifest>>Loaded module manifests (composed by the binary), served at GET /api/v1/modules so the
dashboard renders nav + routes from live truth. The kernel names no module — it only carries
whatever the composing server populated.
catalog: Arc<CatalogService>The plugin store’s catalog engine (bundled + signed remote registries).
http: Client§started_at: DateTime<Utc>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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more