pub(super) fn shadow<A, B, K, V>(
main: A,
shadow: B,
) -> ShadowIter<A::IntoIter, B::IntoIter> ⓘExpand description
Returns an iterator combining two other iterators (sorted by K).
If K is found in the shadow iterator (B), the element will be yielded from B, else from A.
This allows computing environment variables without having to clone and mutate the entire environment variables struct (see DerivationBuilder::hash_derivation_modulo).