pub trait TryCollect: Iterator + Sized {
// Provided method
fn try_collect<C: TryFromIterator<Self::Item>>(self) -> Result<C, C::Error> { ... }
}Expand description
Extension trait for iterators that provides fallible collection.
Provided Methods§
Sourcefn try_collect<C: TryFromIterator<Self::Item>>(self) -> Result<C, C::Error>
fn try_collect<C: TryFromIterator<Self::Item>>(self) -> Result<C, C::Error>
Attempts to collect elements into a collection that may fail.
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: Iterator> TryCollect for I
Available on neither
commonware_stability_GAMMA nor commonware_stability_DELTA nor commonware_stability_EPSILON nor commonware_stability_RESERVED.