1 2 3 4 5 6 7 8 9 10 11 12 13
/// Something which can be invalidated. pub trait Invalidatable<M> { fn invalidated_by(&self, _mutation: &M) -> bool { true } } impl<T> Invalidatable<()> for T {} /// Something which produces invalidations. pub trait Invalidator<M> { fn mutations(&self) -> Vec<M>; }