Instance Method

output(at:)

Publishes a specific element, indicated by its index in the sequence of published elements.

Declaration

func output(at index: Int) -> Publishers.Output<Publishers.Catch<Upstream, NewPublisher>>

Parameters

index

The index that indicates the element to publish.

Return Value

A publisher that publishes a specific indexed element.

Discussion

If the publisher completes normally or with an error before publishing the specified element, then the publisher doesn’t produce any elements.