// Copyright 2025 Jonas Kruckenberg // // Licensed under the Apache License, Version 2.0, or the MIT license , at your option. This file may not be // copied, modified, or distributed except according to those terms. pub enum Either { /// A value of type `L`. Left(L), /// A value of type `R`. Right(R), } impl Iterator for Either where L: Iterator, R: Iterator, { type Item = T; fn next(&mut self) -> Option { match self { Either::Left(left) => left.next(), Either::Right(right) => right.next(), } } }