BasePublisher

public class BasePublisher<Element> : Publisher

A concrete implementation of the Publisher that will forward all events published to the contained observable and therefore to the observers subscribed to it.

  • Creates a new base publisher.

    Declaration

    Swift

    public init()
  • Publishes an element to all subscribers.

    Declaration

    Swift

    public func publish(_ element: Element)

    Parameters

    element

    The element to publish.

  • Declaration

    Swift

    public func asObservable() -> Observable<Element>