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 deserialisedConfig<C>. Heavyweight; needs custom plumbing. - A
schemars-driven walk overConfig::schema(). Brittle once$refresolution,oneOf/anyOfforOption, 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§
- Credential
Bearing - Exposes the
CredentialRefs in a downstream tool’s config tortb-cli’scredentialssubtree.