Generic Structure


A publisher that awaits subscription before running the supplied closure to create a publisher for the new subscriber.


struct Deferred<DeferredPublisher> where DeferredPublisher : Publisher


Type Aliases

typealias Deferred.Failure

The kind of errors this publisher might publish.

typealias Deferred.Output

The kind of values published by this publisher.


Instance Properties

let createPublisher: () -> DeferredPublisher

The closure to execute when this deferred publisher receives a subscription.

Instance Methods

func max() -> Publishers.Comparison<Deferred<DeferredPublisher>>
func min() -> Publishers.Comparison<Deferred<DeferredPublisher>>
func switchToLatest() -> Publishers.SwitchToLatest<DeferredPublisher.Output, Deferred<DeferredPublisher>>


Conforms To

See Also

Convenience Publishers

class Future

A publisher that eventually produces a single value and then finishes or fails.

struct Just

A publisher that emits an output to each subscriber just once, and then finishes.

struct Empty

A publisher that never publishes any values, and optionally finishes immediately.

struct Fail

A publisher that immediately terminates with the specified error.

struct Record

A publisher that allows for recording a series of inputs and a completion, for later playback to each subscriber.