Skip to main content

Module typed_config

Module typed_config 

Source
Expand description

Type-erased typed-config storage for crate::app::App.

Two pieces work together:

  • ErasedConfigArc<dyn Any + Send + Sync> storage so Arc::downcast can recover Arc<Config<C>> sharing the same allocation as the trait object (cheap clone, single refcount).
  • TypedConfigOps — captured-at-builder-time closures that render the schema and the merged value as serde_json::Value, without consumers needing to know C. The rtb-cli config subtree reads these to drive the schema-aware show / get / set / schema / validate leaves.

See docs/development/specs/2026-05-09-v0.4.1-scope.md §3 for the design rationale (option (a) — type-erased App with Any-downcast plus closure-based ops).

Structs§

TypedConfigOps
Type-erased view onto a wired typed config.

Functions§

erase
Wrap a Config<C> as an ErasedConfig for storage on crate::app::App. Used by App::new and TestAppBuilder.

Type Aliases§

ErasedConfig
Type-erased config storage.