pub trait BalanceStateHasher<T: LazyBalanceMarker, M: ManualBalanceModel<T>> {
// Required method
fn hash(state: &BalanceState<T, M>) -> u64;
}Expand description
Defines a primary hashing strategy for BalanceState instances.
Used to uniquely identify a state during exploration or testing, allowing model checkers to avoid revisiting previously seen states.
Implementors can choose any hashing scheme appropriate for their use case, as long as it provides sufficient uniqueness for pruning duplicate states during operation sequencing.
This is typically used to:
- detect already explored states
- prevent redundant execution paths
- guide search strategies over operation sequences
Required Methods§
Sourcefn hash(state: &BalanceState<T, M>) -> u64
fn hash(state: &BalanceState<T, M>) -> u64
Computes a hash representing the given state.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.