Instance Method

receive(subscription:)

Tells the subscriber that it has successfully subscribed to the publisher and may request items.

Required.

Declaration

func receive(subscription: Subscription)

Parameters

subscription

A subscription that represents the connection between publisher and subscriber.

Discussion

Use the received Subscription to request items from the publisher.

See Also

Receiving Life Cycle Events

func receive(completion: Subscribers.Completion<Self.Failure>)

Tells the subscriber that the publisher has completed publishing, either normally or with an error.

Required.

enum Subscribers.Completion

A signal that a publisher doesn’t produce additional elements, either due to normal completion or an error.