Skip to main content

Module bearing

Module bearing 

Source
Expand description

CredentialBearing — the introspection seam used by rtb-cli’s credentials subtree to enumerate the CredentialRefs a downstream tool’s config knows about.

§Design rationale

credentials list / test / doctor need to walk every credential a tool’s typed config carries. Three options were considered in the v0.4 scope addendum (§4.1 / O1):

  • A serde-trait visitor that walks the deserialised Config<C>. Heavyweight; needs custom plumbing.
  • A schemars-driven walk over Config::schema(). Brittle once $ref resolution, oneOf/anyOf for Option, and JSON-pointer ↔ Rust path mismatches enter the picture.
  • An explicit trait downstream tools implement. Five lines per tool, no schema-walking, no edge cases. Chosen.

A #[derive(CredentialBearing)] proc-macro is deferred to v0.5.

Traits§

CredentialBearing
Exposes the CredentialRefs in a downstream tool’s config to rtb-cli’s credentials subtree.