Generic Instance Method

receive(subscriber:)

Attaches the specified subscriber to this publisher.

Required.

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

func subscribe<S>(S)

Attaches the specified subscriber to this publisher.

func subscribe<S>(S) -> AnyCancellable

Attaches the specified subject to this publisher.