Contents

AsyncPublisher

A publisher that exposes its elements as an asynchronous sequence.

Declaration

struct AsyncPublisher<P> where P : Publisher, P.Failure == Never

Overview

AsyncPublisher conforms to AsyncSequence, which allows callers to receive values with the for-await-in syntax, rather than attaching a Subscriber.

Use the values property of the Publisher protocol to wrap an existing publisher with an instance of this type.

Topics

Creating an asynchronous publisher

Creating an iterator

Supporting types

See Also

Asynchronous Publishers