Skip to main content

ensure_field_count

Function ensure_field_count 

Source
fn ensure_field_count(
    declared: usize,
    expected: usize,
    what: &str,
) -> Result<()>
Expand description

Checks that a node declares declared fields where its input provides expected.

Some nodes compute their layout instead of keeping their input’s: a final aggregate produces one value per accumulator the state holds, and a vector-vector binary operation produces one field per matched pair, which is the shorter side’s count. Both are checked against the count the kernel produces, so the message names the node and both numbers.