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§
Required Methods§
fn collect_combined_result<B>(self) -> Result<B, EcoVec<SourceDiagnostic>>where
B: FromIterator<Self::Item>,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".