Trait AsyncIterUtils
Source pub trait AsyncIterUtils: Stream {
// Provided methods
fn collect_vec(self) -> impl Future<Output = Vec<Self::Item>>
where Self: Sized { ... }
fn collect_set<K>(self) -> impl Future<Output = HashSet<K>>
where HashSet<K>: Extend<Self::Item>,
K: Hash + Eq,
Self: Sized { ... }
fn collect_map<K, V>(self) -> impl Future<Output = HashMap<K, V>>
where HashMap<K, V>: Extend<Self::Item>,
K: Hash + Eq,
Self: Sized { ... }
fn try_collect_vec<E>(
self,
) -> impl Future<Output = Result<Vec<Self::Item>, E>>
where Self: Sized + TryStream<Error = E>,
Vec<Self::Item>: Extend<Self::Ok> { ... }
fn try_collect_set<K, E>(
self,
) -> impl Future<Output = Result<HashSet<K>, E>>
where Self: Sized + TryStream<Error = E>,
HashSet<K>: Extend<Self::Ok>,
K: Hash + Eq { ... }
fn try_collect_map<K, V, E>(
self,
) -> impl Future<Output = Result<HashMap<K, V>, E>>
where Self: Sized + TryStream<Error = E>,
HashMap<K, V>: Extend<Self::Ok>,
K: Hash + Eq { ... }
}