TryFromIterator

Trait TryFromIterator 

Source
pub trait TryFromIterator<T>: Sized {
    type Error;

    // Required method
    fn try_from_iter<I: IntoIterator<Item = T>>(
        iter: I,
    ) -> Result<Self, Self::Error>;
}
Expand description

A type that can be constructed from an iterator, possibly failing.

Required Associated Types§

Source

type Error

The error type returned when construction fails.

Required Methods§

Source

fn try_from_iter<I: IntoIterator<Item = T>>( iter: I, ) -> Result<Self, Self::Error>

Attempts to construct Self from an iterator.

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§