Generic Structure


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


struct Record<Output, Failure> where Failure : Error



init(from: Decoder)

Creates a record publisher from the provided decoder.

init(output: [Output], completion: Subscribers.Completion<Failure>)

Creates a record publisher to publish the provided elements, followed by the provided completion value.

init(record: (inout Record<Output, Failure>.Recording) -> Void)

Creates a publisher to interactively record a series of outputs and a completion.

init(recording: Record<Output, Failure>.Recording)

Creates a record publisher from an existing recording.

Instance Properties

let recording: Record<Output, Failure>.Recording

The recorded output and completion.

Instance Methods

func encode(to: Encoder)
func max() -> Publishers.Comparison<Record<Output, Failure>>
func min() -> Publishers.Comparison<Record<Output, Failure>>
func switchToLatest() -> Publishers.SwitchToLatest<Output, Record<Output, Failure>>


struct Record.Recording

A recorded sequence of outputs, followed by a completion value.


Conforms To

  • Decodable
  • Encodable

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 Deferred

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

struct Empty

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

struct Fail

A publisher that immediately terminates with the specified error.