pub fn rules_version(rules: &[ConcealRule]) -> u64Expand description
A stamp identifying a rule set, for the matrix’s conceal axis.
Zero for an empty rule set, and that is the load-bearing case.
Every buffer whose language declares no rules gets a constant, so
the axis cannot move for it — which is what keeps i in a Rust
file from costing a viewport rebuild once H.4 folds the modal state
in here. The check is is_empty() before any hashing, so those
buffers pay a branch.
Hashes the declarations rather than the Arc’s address: a pointer
would change on any reallocation that did not change a rule, and
would compare equal across two different rule sets that happened to
land at the same address after a free.