Protocol

ConnectablePublisher

A publisher that provides an explicit means of connecting and canceling publication.

Declaration

protocol ConnectablePublisher

Overview

Use makeConnectable() to create a ConnectablePublisher from any publisher whose failure type is Never.

Topics

Performing Explicit Connections

func connect() -> Cancellable

Connects to the publisher and returns a Cancellable instance with which to cancel publishing.

Required.

Connecting Automatically

func autoconnect() -> Publishers.Autoconnect<Self>

Automates the process of connecting or disconnecting from this connectable publisher.

See Also

Publishers

protocol Publisher

Declares that a type can transmit a sequence of values over time.

Beta
enum Publishers

A namespace for types that serve as publishers.

Beta
struct AnyPublisher

A type-erasing publisher.

Beta
struct Published

A type that publishes a property marked with an attribute.

Beta
protocol Cancellable

A protocol indicating that an activity or action supports cancellation.

Beta
class AnyCancellable

A type-erasing cancellable object that executes a provided closure when canceled.

Beta

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