Skip to main content

oxilean_std/either/
eitherleftiter_traits.rs

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