Skip to main content

EitherIterExt

Trait EitherIterExt 

Source
pub trait EitherIterExt<A, B>: Iterator<Item = OxiEither<A, B>> + Sized {
    // Provided methods
    fn lefts(self) -> LeftIter<A, B, Self>  { ... }
    fn rights(self) -> RightIter<A, B, Self>  { ... }
    fn partition_either(self) -> (Vec<A>, Vec<B>) { ... }
}
Expand description

Extension methods for iterators of OxiEither.

Provided Methods§

Source

fn lefts(self) -> LeftIter<A, B, Self>

Yield only the Left values.

Source

fn rights(self) -> RightIter<A, B, Self>

Yield only the Right values.

Source

fn partition_either(self) -> (Vec<A>, Vec<B>)

Partition into (lefts, rights).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<A, B, I: Iterator<Item = OxiEither<A, B>>> EitherIterExt<A, B> for I