pub trait TryFromIteratorIn<T, A: Allocator>: Sized {
    // Required method
    fn try_from_iter_in<I>(iter: I, alloc: A) -> Result<Self, Error>
       where I: IntoIterator<Item = T>;
}
Expand description

Conversion from an Iterator within a custom allocator A.

By implementing TryFromIteratorIn for a type, you define how it will be created from an iterator. This is common for types which describe a collection of some kind.

Required Methods§

source

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

Creates a value from an iterator within an allocator.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T, U, E, A: Allocator> TryFromIteratorIn<Result<T, E>, A> for Result<U, E>
where U: TryFromIteratorIn<T, A>,

source§

fn try_from_iter_in<I>(iter: I, alloc: A) -> Result<Self, Error>
where I: IntoIterator<Item = Result<T, E>>,

Implementors§

source§

impl<'a, A: Allocator> TryFromIteratorIn<&'a str, A> for String<A>

source§

impl<A: Allocator> TryFromIteratorIn<char, A> for String<A>

source§

impl<K, V, A: Allocator> TryFromIteratorIn<(K, V), A> for BTreeMap<K, V, A>
where K: Ord,

source§

impl<K, V, S, A: Allocator> TryFromIteratorIn<(K, V), A> for HashMap<K, V, S, A>
where K: Eq + Hash, S: BuildHasher + Default,

source§

impl<T, A: Allocator> TryFromIteratorIn<T, A> for Box<[T], A>

source§

impl<T, A: Allocator> TryFromIteratorIn<T, A> for BTreeSet<T, A>
where T: Ord,

source§

impl<T, A: Allocator> TryFromIteratorIn<T, A> for Vec<T, A>

source§

impl<T, A: Allocator> TryFromIteratorIn<T, A> for VecDeque<T, A>

source§

impl<T, S, A: Allocator> TryFromIteratorIn<T, A> for HashSet<T, S, A>
where T: Eq + Hash, S: BuildHasher + Default,