Skip to main content

from_value

Function from_value 

Source
pub fn from_value(v: &Value) -> Result<Tick, String>
Expand description

Strict parse of an on-disk tick — this IS the R1 (closed schema) + R2 (check shape) check.

Two-tier forward-compat (T3): the hashed/identity set (HASHED_TOP_LEVEL_KEYS) stays STRICT — a missing one is an Err, and the nested grounds/check schemas reject any unknown key inside the HASHED payload, so the content-addressed id can never carry an unvalidated field. The known non-hashed fields are validated. A truly-unknown OTHER top-level key is TOLERATED (parsed through, not rejected) so a newer writer’s bookkeeping field does not brick an older reader; ev verify surfaces it as a warning: so a typo’d field name stays visible.