Expand description
telemetry CLI subtree — status / enable / disable / reset.
Backed by rtb_telemetry::consent’s persisted-consent file
primitives. The file lives at
<ProjectDirs::config_dir()>/<tool>/consent.toml.
§Runtime policy resolution
Per the v0.4 scope addendum §3.2, the runtime CollectionPolicy
resolves from this chain (each step short-circuits):
- Hardcoded compile-time disable — when the
telemetryCargo feature onrtbis off, the policy is unconditionallyDisabled. The subtree is not registered;telemetry statusis unreachable from the CLI. - Consent file —
<config_dir>/<tool>/consent.toml. Stateenabled→Enabled;disabled→Disabled;unsetor file missing → step 3. MYTOOL_TELEMETRYenv var —1/true/on→Enabled;0/false/off→Disabled; absent → step 4.- Default —
Disabled. Opt-in is the standing rule.
telemetry status reports which step decided the current state.
§Lint exception
linkme::distributed_slice emits #[link_section] which Rust
1.95+ flags under unsafe_code. Allowed at module level — no
hand-rolled unsafe blocks anywhere in the module.
Structs§
- Telemetry
Cmd - The
telemetrysubcommand.