parallel-stream icon indicating copy to clipboard operation
parallel-stream copied to clipboard

[tracking] Streams parity

Open yoshuawuyts opened this issue 5 years ago • 4 comments

Similar to https://github.com/async-rs/async-std/issues/129, this tracks all missing methods and functions for ParallelStream. Each method and function should take an async closure as an argument (even if it's still slightly cumbersome to do so), and expose its return future.

If you'd like to implement a method or a function, just comment on this issue and it's yours!

Missing free functions

  • [ ] from_fn
  • [ ] repeat_with
  • [ ] successors

Missing traits

  • [ ] ParallelExtend
  • [ ] ParallelProduct
  • [ ] ParallelSum

Missing stream methods

  • [ ] ParallelStream::all
  • [ ] ParallelStream::any
  • [ ] ParallelStream::by_ref
  • [ ] ParallelStream::chain
  • [ ] ParallelStream::cloned
  • [ ] ParallelStream::cmp
  • [ ] ParallelStream::collect
  • [ ] ParallelStream::copied
  • [ ] ParallelStream::count
  • [ ] ParallelStream::cycle
  • [ ] ParallelStream::enumerate
  • [ ] ParallelStream::eq
  • [ ] ParallelStream::filter
  • [ ] ParallelStream::filter_map
  • [ ] ParallelStream::find
  • [ ] ParallelStream::find_map
  • [ ] ParallelStream::flat_map
  • [ ] ParallelStream::flatten
  • [ ] ParallelStream::fold
  • [x] ParallelStream::for_each
  • [ ] ParallelStream::fuse
  • [ ] ParallelStream::ge
  • [ ] ParallelStream::gt
  • [ ] ParallelStream::inspect
  • [ ] ParallelStream::last
  • [ ] ParallelStream::le
  • [ ] ParallelStream::lt
  • [x] ParallelStream::map
  • [ ] ParallelStream::max
  • [ ] ParallelStream::max_by
  • [ ] ParallelStream::max_by_key
  • [ ] ParallelStream::min
  • [ ] ParallelStream::min_by
  • [ ] ParallelStream::min_by_key
  • [ ] ParallelStream::ne
  • [x] ParallelStream::next
  • [ ] ParallelStream::nth
  • [ ] ParallelStream::partial_cmp
  • [ ] ParallelStream::partition
  • [ ] ParallelStream::peekable
  • [ ] ParallelStream::position
  • [ ] ParallelStream::product
  • [ ] ParallelStream::rev
  • [ ] ParallelStream::rposition
  • [ ] ParallelStream::scan
  • [ ] ParallelStream::size_hint
  • [ ] ParallelStream::skip
  • [ ] ParallelStream::skip_while
  • [ ] ParallelStream::step_by
  • [ ] ParallelStream::sum
  • [ ] ParallelStream::take
  • [ ] ParallelStream::take_while
  • [ ] ParallelStream::try_fold
  • [ ] ParallelStream::try_for_each
  • [ ] ParallelStream::unzip
  • [ ] ParallelStream::zip

Missing FromStream impls

  • [ ] FromParallelStream<()> for ()
  • [ ] FromParallelStream<char> for String
  • [ ] FromParallelStream<String> for String
  • [ ] FromParallelStream<&'a char> for String
  • [ ] FromParallelStream<&'a str> for String
  • [ ] FromParallelStream<T> for Cow<'a, [T]> where T: Clone
  • [ ] FromParallelStream<A> for Box<[A]>
  • [ ] FromParallelStream<A> for VecDeque<A>
  • [ ] FromParallelStream<Result<A, E>> for Result<V, E> where V: FromStream<A>
  • [ ] FromParallelStream<Option<A>> for Option<V> where V: FromStream<A>
  • [ ] FromParallelStream<(K, V)> for BTreeMap<K, V> where K: Ord
  • [ ] FromParallelStream<(K, V)> for HashMap<K, V, S> where K: Eq + Hash, S: BuildHasher + Default
  • [ ] FromParallelStream<T> for BinaryHeap<T> where T: Ord
  • [ ] FromParallelStream<T> for BTreeSet<T> where T: Ord
  • [ ] FromParallelStream<T> for LinkedList<T>
  • [ ] FromParallelStream<T> for Vec<T>
  • [ ] FromParallelStream<T> for HashSet<T, S> where T: Eq + Hash, S: BuildHasher + Default

yoshuawuyts avatar Mar 14 '20 17:03 yoshuawuyts

I would like to take on ParallelStream::any if that seems reasonable. Since Contributing on the readme seems unavailable, should I PR directly? 🙂

amadeusine avatar Mar 18 '20 06:03 amadeusine

@amadeusine that all sounds perfect!

yoshuawuyts avatar Mar 18 '20 22:03 yoshuawuyts

I'd like to add ParallelStream::count if that's okay for you.

Thegaram avatar Mar 20 '20 14:03 Thegaram

#10 Implementation of FilterMap, would be willing to do more as well.

CollinValley avatar Mar 22 '20 23:03 CollinValley