Skip to main content

detect_version

Function detect_version 

Source
pub fn detect_version(value: &Value) -> Result<u32, Error>
Expand description

Detect a config’s schema version from its parsed TOML representation.

  • Missing top-level schema_version key → V1 (pre-versioned).
  • Integer ≥ 1 → that integer.
  • Anything else → error.