Generic Structure

Fail

A publisher that immediately terminates with the specified error.

Declaration

struct Fail<Output, Failure> where Failure : Error

Topics

Initializers

init(error: Failure)

Creates a publisher that immediately terminates with the specified failure.

init(outputType: Output.Type, failure: Failure)

Creates publisher with the given output type, that immediately terminates with the specified failure.

Instance Properties

let error: Failure

The failure to send when terminating the publisher.

Instance Methods

func max() -> Publishers.Comparison<Fail<Output, Failure>>
func min() -> Publishers.Comparison<Fail<Output, Failure>>
func switchToLatest() -> Publishers.SwitchToLatest<Output, Fail<Output, Failure>>

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

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