MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / env_parse

Function env_parse

src/config.rs:233–237  ·  view source on GitHub ↗

Reads a `TRACEDECAY_ ` env var and parses it as an integer of the caller's choosing.

(suffix: &str)

Source from the content-addressed store, hash-verified

231/// Reads a `TRACEDECAY_<suffix>` env var and parses it as an integer of the
232/// caller's choosing.
233fn env_parse<T: std::str::FromStr>(suffix: &str) -> Option<T> {
234 brand_env(suffix)
235 .as_deref()
236 .and_then(|raw| raw.trim().parse::<T>().ok())
237}
238
239impl SyncConfig {
240 /// Applies `TRACEDECAY_SYNC_*` environment overrides on top of `self`,

Callers 1

with_env_overridesMethod · 0.85

Calls 1

brand_envFunction · 0.85

Tested by

no test coverage detected