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.

enum Publishers

A namespace for types that serve as publishers.

struct AnyPublisher

A type-erasing publisher.

struct Published

A type that publishes a property marked with an attribute.

protocol Cancellable

A protocol indicating that an activity or action supports cancellation.

class AnyCancellable

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