pub trait TryEnvelopeCollectionExt<'env>: EnvelopeCollection<'env> {
// Provided method
fn try_consume<E>(
self,
) -> Result<(Vec<<E as TryExtractor>::Ok>, Vec<<E as TryExtractor>::Error>), EnvelopeError>
where for<'a, 'a> E: TryExtractor + Default + EnvelopeVisitor<'a>,
for<'a> EnvelopeError: From<<E as EnvelopeVisitor<'a>>::Error> + From<<E as TryExtractor>::Error>,
Self: Sized { ... }
}Expand description
Extension trait for an envelope collection which handles errors.
Provided Methods§
Sourcefn try_consume<E>(
self,
) -> Result<(Vec<<E as TryExtractor>::Ok>, Vec<<E as TryExtractor>::Error>), EnvelopeError>where
for<'a, 'a> E: TryExtractor + Default + EnvelopeVisitor<'a>,
for<'a> EnvelopeError: From<<E as EnvelopeVisitor<'a>>::Error> + From<<E as TryExtractor>::Error>,
Self: Sized,
fn try_consume<E>(
self,
) -> Result<(Vec<<E as TryExtractor>::Ok>, Vec<<E as TryExtractor>::Error>), EnvelopeError>where
for<'a, 'a> E: TryExtractor + Default + EnvelopeVisitor<'a>,
for<'a> EnvelopeError: From<<E as EnvelopeVisitor<'a>>::Error> + From<<E as TryExtractor>::Error>,
Self: Sized,
run a sequenced extraction on the envelopes in this collection. Flattens and returns errors into one Result<_, E>