pub trait ConsistencyCheck: Clone + Default {
    // Required method
    fn check_consistency<T: PartialEq + Debug, Input>(
        &self,
        cache: T,
        input: &Input,
        query: fn(_: &Input) -> T
    );
}
Expand description

Trait to configure consistency checking behavior

Required Methods§

source

fn check_consistency<T: PartialEq + Debug, Input>( &self, cache: T, input: &Input, query: fn(_: &Input) -> T )

Called when the Memo struct has a cached value

An implementation can assert that the cache value matches the current query result

Object Safety§

This trait is not object safe.

Implementors§