pub fn to_stored(value: &Value, ty: &TypeDesc) -> Result<Value, Misfit>Expand description
Values given as JSON ({"day": "2026-10-01"}), already checked against the schema, in the
form they are stored in, by the declared type ({"day": {"$date": "2026-10-01"}}).
§Errors
Where and why a value doesn’t fit its type: a date that isn’t one, a duration in months, a value of a type outputs can’t hold, text containing NUL. The reason never quotes the value.