Trait ssz::TryFromIter

source ·
pub trait TryFromIter<T>: Sized {
    type Error: Debug;

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

Partial variant of std::iter::FromIterator.

This trait is implemented for types which can be constructed from an iterator of decoded SSZ values, but which may refuse values once a length limit is reached.

Required Associated Types§

Required Methods§

source

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<K, V> TryFromIter<(K, V)> for BTreeMap<K, V>
where K: Ord,

§

type Error = Infallible

source§

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

source§

impl<T> TryFromIter<T> for BTreeSet<T>
where T: Ord,

§

type Error = Infallible

source§

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

source§

impl<T> TryFromIter<T> for Vec<T>

§

type Error = Infallible

source§

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

source§

impl<T, const N: usize> TryFromIter<T> for SmallVec<[T; N]>

§

type Error = Infallible

source§

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

Implementors§