Skip to main content

validate_record_length

Function validate_record_length 

Source
pub fn validate_record_length(
    schema: &Schema,
    configured_lrecl: u32,
    record_index: u64,
    record_data: &[u8],
) -> Result<()>
Expand description

Validate a fixed record against the codec’s schema and framing contract.

This check intentionally lives beside schema-to-framing integration rather than in copybook-fixed, so the framing crate remains schema-independent.

§Errors

Returns an error when the configured LRECL cannot be represented on the current platform or when the record length does not match it.