Generic Structure


A type-erasing subscriber.


@frozen struct AnySubscriber<Input, Failure> where Failure : Error


Use an AnySubscriber to wrap an existing subscriber whose details you don’t want to expose. You can also use AnySubscriber to create a custom subscriber by providing closures for the methods defined in Subscriber, rather than implementing Subscriber directly.


Creating a Type-Erased Subscriber


Creates a type-erasing subscriber to wrap an existing subscriber.

Receiving Elements

func receive() -> Subscribers.Demand

Tells the subscriber that a publisher of void elements is ready to receive further requests.


Instance Properties

var combineIdentifier: CombineIdentifier

See Also


Processing Published Elements with Subscribers

Apply back pressure to precisely control when publishers produce elements.

protocol Subscriber

A protocol that declares a type that can receive input from a publisher.

enum Subscribers

A namespace for types that serve as subscribers.

protocol Subscription

A protocol representing the connection of a subscriber to a publisher.

enum Subscriptions

A namespace for symbols related to subscriptions.