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.Share<Upstream>>

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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software