Trait TryFromIterator
pub trait TryFromIterator<T, E>: Sized {
// Required method
fn try_from_iter<I>(iter: I) -> Result<Self, E>
where I: Iterator<Item = T>;
}Expand description
Analogue of FromIterator in the standard library, but used with
TryCollect::try_collect instead.
Required Methods§
fn try_from_iter<I>(iter: I) -> Result<Self, E>where
I: Iterator<Item = T>,
fn try_from_iter<I>(iter: I) -> Result<Self, E>where
I: Iterator<Item = T>,
Creates an intance of this collection from the iter provided.
Does not abort on OOM but insteads return an error.
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.