Skip to main content

ensure_declared_schema

Function ensure_declared_schema 

Source
fn ensure_declared_schema(
    declared: &SeriesSchema,
    expected: &SeriesSchema,
) -> Result<()>
Expand description

Rejects an expected series schema the frame does not declare.

Only the two things a caller can get wrong are checked, because those are the only two things [SeriesSchema] holds: the logical fields and their order, and the evaluation grid. A raw frame carries no grid and an evaluated one carries exactly its own, so the grid comparison is also what keeps a raw expectation from decoding an evaluated frame.