Contents

AnySubscriber

A type-erasing subscriber.

Declaration

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

Overview

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.

Topics

Creating a type-erased subscriber

See Also

Subscribers