Combine Convenience Publishers

Future

final class Future<Output, Failure> where Failure : Error
  • A publisher that eventually produces a single value and then finishes or fails.

Just

struct Just<Output>
  • A publisher that emits an output to each subscriber just once, and then finishes.

Deferred

struct Deferred<DeferredPublisher> where DeferredPublisher : Publisher
  • A publisher that awaits subscription before running the supplied closure to create a publisher for the new subscriber.

Empty

struct Empty<Output, Failure> where Failure : Error
  • A publisher that never publishes any values, and optionally finishes immediately.

Fail

struct Fail<Output, Failure> where Failure : Error
  • A publisher that immediately terminates with the specified error.

Record

struct Record<Output, Failure> where Failure : Error
  • A publisher that allows for recording a series of inputs and a completion, for later playback to each subscriber.

References