Skip to main content

read_schema_epoch

Function read_schema_epoch 

Source
pub fn read_schema_epoch(data: &[u8]) -> Option<u32>
Expand description

Read the schema_epoch field from an already-written header.

Returns None if data is too short. Returns the stored value verbatim, callers that want the “0 means legacy” compatibility rule should apply it themselves:

let stored = read_schema_epoch(data)?;
let effective = if stored == 0 { DEFAULT_SCHEMA_EPOCH } else { stored };