pub fn validate_block_count<E>(
family: impl Into<String>,
expected: usize,
got: usize,
) -> Result<(), E>where
E: From<BlockCountMismatch>,Expand description
Reject any got block count that does not exactly equal expected.
On mismatch, builds a BlockCountMismatch and converts it into the
caller’s error type E (chosen via the turbofish or inferred from the
surrounding ?). On a match, returns Ok(()).
This is the single source of truth for the block-arity guard shared across the family and term modules.