Skip to main content

union

Function union 

Source
pub(crate) fn union<S: Copy, X: Iterator<Item = (Byte, S)>, Y: Iterator<Item = (Byte, S)>>(
    xs: X,
    ys: Y,
) -> UnionIter<X, Y> 
Expand description

Partitions two sequences of byte edges into sorted, non-overlapping ranges.

Within each input, ranges must be non-empty, non-overlapping, and sorted by ascending start. Each output item contains a range and the destination of the edge from each input that covers it. An input with no edge covering the range contributes None. Ranges covered by neither input are omitted. Adjacent output ranges are not coalesced.