TryAllHack

Trait TryAllHack 

Source
pub trait TryAllHack {
    type Iter;
    type AllOrFirst;

    // Required method
    fn try_all(iter: Self::Iter) -> Self::AllOrFirst;
}
Expand description

A hack trait to bypass limitations of type checker.

We have to hack until rust-lang/rust#20400 is closed. CC: paholg.

Required Associated Types§

Required Methods§

Source

fn try_all(iter: Self::Iter) -> Self::AllOrFirst

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T, E, I> TryAllHack for (I, Result<T, E>)
where I: Iterator<Item = Result<T, E>>,

Source§

type Iter = I

Source§

type AllOrFirst = Result<IntoIter<T>, E>

Source§

fn try_all(iter: Self::Iter) -> Self::AllOrFirst

Source§

impl<T, I> TryAllHack for (I, Option<T>)
where I: Iterator<Item = Option<T>>,

Source§

type Iter = I

Source§

type AllOrFirst = Option<IntoIter<T>>

Source§

fn try_all(iter: Self::Iter) -> Self::AllOrFirst

Implementors§