pub struct AppOptions {
pub allow_labels: Option<bool>,
pub in_memory: bool,
pub metrics_enabled: bool,
}Expand description
Options consumed by app_with_options. Fields default to the
same values app derives from the environment; tests construct an
explicit value to bypass the env-var read.
Fields§
§allow_labels: Option<bool>Override for MNEM_BENCH. None means “read the env var”; set
to Some(true) in integration tests that exercise the label
round-trip without polluting the process-wide environment.
in_memory: boolWhen true, use MemoryBlockstore + MemoryOpHeadsStore instead
of the redb-backed on-disk store. All commits live in RAM and
are lost on process exit. Intended for benchmark harnesses and
ephemeral agent sessions where durability is undesired and
commit throughput matters (redb fsync can be 30-40x slower than
memory per commit; see internal benchmarking). Never
enable this in a deployment that needs to survive restart.
metrics_enabled: boolMount the /metrics Prometheus endpoint.
true mounts the route; false omits it entirely (scrapes
get a 404). The tracking middleware that populates the
counters still runs either way – flipping this on at the next
restart begins exposing already-collected data.
Trait Implementations§
Source§impl Clone for AppOptions
impl Clone for AppOptions
Source§fn clone(&self) -> AppOptions
fn clone(&self) -> AppOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more