merge_for_write

Function merge_for_write 

Source
fn merge_for_write(
    existing: &[u8],
    rec: &DefinitionRecord,
) -> Result<Option<Vec<u8>>, DefStoreError>
Expand description

Merge an in-memory record into an on-disk file’s raw JSON, preserving fields beyond this binary’s struct shape. Returns Ok(None) (skip, leave file intact) on corrupt JSON, missing schema_version, or schema_version above DEF_MAX_SUPPORTED_SCHEMA. Parallels store.rs::merge_for_write (see module docs).