Gets the value at `index`, or inserts one by calling `value` if it doesn't exist. This method works on `IdVec >` to provide map-like semantics. If the index is out of bounds or contains `None`, `value` is called to create a new element. # Examples ``` # use hashql_core::id::{IdVec, Id as _, newtype}; # newtype!(struct MyId(u32 is 0..=100)); let mut vec = IdVec::
(&mut self, index: I, value: impl FnOnce() -> T)
| 559 | /// assert_eq!(vec.len(), 3); |
| 560 | /// ``` |
| 561 | pub fn get_or_insert_with(&mut self, index: I, value: impl FnOnce() -> T) -> &mut T { |
| 562 | self.fill_until(index, || None).get_or_insert_with(value) |
| 563 | } |
| 564 | } |
| 565 | |
| 566 | impl<I, T, A> Debug for IdVec<I, T, A> |
no test coverage detected