Contents

PassthroughSubject

A subject that broadcasts elements to downstream subscribers.

Declaration

final class PassthroughSubject<Output, Failure> where Failure : Error

Mentioned in

Overview

As a concrete implementation of Subject, the PassthroughSubject provides a convenient way to adapt existing imperative code to the Combine model.

Unlike CurrentValueSubject, a PassthroughSubject doesn’t have an initial value or a buffer of the most recently-published element. A PassthroughSubject drops values if there are no subscribers, or its current demand is zero.

Topics

Creating a passthrough subject

See Also

Subjects