In Java, the Guava Maps.transformValues(Map<K,V1> fromMap, Function<V1,V2> function)
creates a new view of the map. javadoc
Is there a similar function in Rust that returns a view of a map without allocating a new map?
My use case is I have a HashMap<GuardId, [u8; 60]>
and I want to transform it into HashMap<GuardId, u8>
.