init(upstream:maxPublishers:transform:)
Creates a publisher that transforms elements from an upstream publisher into a new publisher.
Declaration
init(upstream: Upstream, maxPublishers: Subscribers.Demand, transform: @escaping (Upstream.Output) -> NewPublisher)Parameters
- upstream:
The publisher from which this publisher receives elements.
- maxPublishers:
The maximum number of concurrent publisher subscriptions.
- transform:
A closure that takes an element as a parameter and returns a publisher that produces elements of that type.