(&mut self, key: K, f: F)
| 45 | } |
| 46 | |
| 47 | pub fn get_or_put<F>(&mut self, key: K, f: F) -> &V |
| 48 | where |
| 49 | F: FnOnce() -> V, |
| 50 | { |
| 51 | self.0.get_or_insert(key, f) |
| 52 | } |
| 53 | |
| 54 | pub fn try_get_or_insert<F, E>(&mut self, k: K, f: F) -> Result<&V, E> |
| 55 | where |
no outgoing calls
no test coverage detected