Contents

init(receiveSubscription:receiveValue:receiveCompletion:)

Creates a type-erasing subscriber that executes the provided closures.

Declaration

init(receiveSubscription: ((any Subscription) -> Void)? = nil, receiveValue: ((Input) -> Subscribers.Demand)? = nil, receiveCompletion: ((Subscribers.Completion<Failure>) -> Void)? = nil)

Parameters

  • receiveSubscription:

    A closure to execute when the subscriber receives the initial subscription from the publisher.

  • receiveValue:

    A closure to execute when the subscriber receives a value from the publisher.

  • receiveCompletion:

    A closure to execute when the subscriber receives a completion callback from the publisher.

See Also

Creating a type-erased subscriber