async fn expand_tail<'db>(
env: &mut Env<'db>,
live_after: LivePlaces,
direction: Direction,
unexpanded_linkvecs: Vec<Vec<RedLink<'db>>>,
expanded_chains: Vec<RedChain<'db>>,
consumer: &mut Consumer<'_, 'db, Vec<RedChain<'db>>, Errors<()>>,
) -> Errors<()>Expand description
After we’ve done the initial expansion to red links, we may end up with a chain
that ends in something like mut[p] or ref[p]. In that case, we need to
find the permissions from p and append them to the chain. This is called
“expansion” in the dada-model code. This function expands the tail recursively
until there are no more permissions to add and then invokes consumer.consume.