CollectCombinedResult

Trait CollectCombinedResult 

pub trait CollectCombinedResult {
    type Item;

    // Required method
    fn collect_combined_result<B>(self) -> Result<B, EcoVec<SourceDiagnostic>>
       where B: FromIterator<Self::Item>;
}
Expand description

Collects an iterator of SourceResults into a result containg a collection or the accumulated errors.

Unlike normal FromIterator for Result, this will combine all the errors. This is possible because a SourceResult can hold multiple errors.

Required Associated Types§

type Item

Required Methods§

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.

Implementors§

§

impl<I, T> CollectCombinedResult for I
where I: Iterator<Item = Result<T, EcoVec<SourceDiagnostic>>>,

§

type Item = T