pub type InvariantsFnTyped<T> = fn(value: &T) -> bool;
Function to validate the invariants of a value. If it returns false, the value is considered invalid.