pub(crate) async fn insert_into_next_slot<F, K, U, V>(
cache: &Cache<K, V>,
generator: F,
value_fn: U,
) -> Option<(K, V)>Expand description
This function will use the given generator to generate an initial seeding key.
It will check whether the given cache already contains a value for that key, and if not,
calls the generator (with the previous value) to generate a new seeding key and retry.
The function either finds a suitable free slot, inserting value generated by value_fn and returns the found key,
or terminates with None when gen returns the initial seed again.