Generic Cache struct
The biggest change you can do is to the value function. Because most of what you are building is actually provided via HashMap'sentry API. This could reduce the body of your value function to simply this:

match self.values.entry(arg) {
    Entry::Occupied(val) =&gt; val.into_mut(),
    Entry::Vacant(slot) =&gt; slot.insert((self.calculation)(arg)),
}


You could also mess with Entry's or_insert_with function, but I personally prefer the approach above.

You may also consider using Clone instead of Copy. The advantage of Clone are that it is more explicit and that it should support more types. The disadvantage obviously is that clone can be arbitrarily expensive. In general I'd say you want Clone for a generic interface such as this.

Finally, I understand it's an exercise, but the names are a bit plain:


Cache is very generic: what do you actually cache? Call it something like FunctionResultCache or Memoizer
value is also a bit weird. What you're doing in essence is wrapping a function, so I'd name this call or invoke or something similar.