As discussed in [rfcs](https://github.com/rust-lang/rfcs/issues/1541), it would make sense to add a `keys()` method to the `Entry` variants for both map types. [PR 32248](https://github.com/rust-lang/rust/pull/32248) has code and tests.