Flattens the stream of events from multiple upstream publishers to appear as if they were coming from a single stream of events.
- 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
This operator switches the inner publisher as new ones arrive but keeps the outer one constant for downstream subscribers. For example, given the type
Publisher<Publisher<Data, NSError>, Never>, calling
switch will result in the type
Publisher<Data, NSError>. The downstream subscriber sees a continuous stream of values even though they may be coming from different upstream publishers.