AnyCancellable
A type-erasing cancellable object that executes a provided closure when canceled.
Declaration
final class AnyCancellableMentioned in
Overview
Subscriber implementations can use this type to provide a “cancellation token” that makes it possible for a caller to cancel a publisher, but not to use the Subscription object to request items.
An AnyCancellable instance automatically calls cancel() when deinitialized.