Expand description
Shared block-count arity guard.
Every family / term entry point that consumes a &[ParameterBlockState]
opens with the identical check: “this family expects exactly N blocks;
reject any other count”. The structure is fixed — only the family name,
the expected arity, and the per-module error enum vary. This module holds
the single canonical implementation so the guard is not re-typed by hand
across modules.
The canonical error message is owned by BlockCountMismatch::message.
Each module routes its own error enum through From<BlockCountMismatch>,
so the per-module error identity (and its Display/variant) is preserved
while the arity-check logic and the message wording live in one place.
Structs§
- Block
Count Mismatch - A block-count arity mismatch: a family that needs exactly
expectedparameter blocks was handedgotof them.
Functions§
- validate_
block_ count - Reject any
gotblock count that does not exactly equalexpected.