oxilean_std/either/leftiter_traits.rs
1//! # LeftIter - Trait Implementations
2//!
3//! This module contains trait implementations for `LeftIter`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Iterator`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use super::types::{LeftIter, OxiEither};
12
13impl<A, B, I: Iterator<Item = OxiEither<A, B>>> Iterator for LeftIter<A, B, I> {
14 type Item = A;
15 fn next(&mut self) -> Option<A> {
16 loop {
17 match self.inner.next()? {
18 OxiEither::Left(a) => return Some(a),
19 OxiEither::Right(_) => continue,
20 }
21 }
22 }
23}