Contents

receive(subscriber:)

Attaches the specified subscriber to this publisher.

Declaration

func receive<S>(subscriber: S) where S : Subscriber, Self.Failure == S.Failure, Self.Output == S.Input

Parameters

  • subscriber:

    The subscriber to attach to this Publisher, after which it can receive values.

Discussion

Implementations of Publisher must implement this method.

The provided implementation of subscribe(_:)calls this method.

See Also

Working with subscribers