Collects all received elements, and emits a single array of the collection when the upstream publisher finishes.
- iOS 13.0+Beta
- macOS 10.15+Beta
- Mac Catalyst 13.0+Beta
- tvOS 13.0+Beta
- watchOS 6.0+Beta
- Xcode 11.0+Beta
A publisher that collects all received items and returns them as an array upon completion.
If the upstream publisher fails with an error, this publisher forwards the error to the downstream receiver instead of sending its output. This publisher requests an unlimited number of elements from the upstream publisher. It only sends the collected array to its downstream after a request whose demand is greater than 0 items. Note: This publisher uses an unbounded amount of memory to store the received values.