Generic Structure

Deferred

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

Declaration

struct Deferred<DeferredPublisher> where DeferredPublisher : Publisher

Topics

Type Aliases

typealias Deferred.Failure

The kind of errors this publisher might publish.

typealias Deferred.Output

The kind of values published by this publisher.

Initializers

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>>

Relationships

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.