PubSub

  • A class that allows to subscribe for events until the returned subscription is disposed.

    See more

    Declaration

    Swift

    public class Observable<Element> : Subscribable
  • A protocol to provide all publisher-like classes access to a corresponding observable.

    See more

    Declaration

    Swift

    public protocol ObservableConvertible<Element>
  • An observable that holds the current value as the current state.

    You can use updates to receive only future updates in a new observable.

    See more

    Declaration

    Swift

    public class ObservableState<Element> : Observable<Element>
  • Contains factory methods for creating common Observable instances for use with the Tealium SDK.

    See more

    Declaration

    Swift

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

    See more

    Declaration

    Swift

    public class BasePublisher<Element> : Publisher
  • A protocol to provide all publisher-like classes some utilities like publish() for Void events.

    See more

    Declaration

    Swift

    public protocol Publisher : ObservableConvertible
  • A Subject that, in addition to normal publish and subscribe behavior, holds a cache of items and sends it, in order, to each new observer that is subscribed.

    You can use it as a property wrapper to make the publishing private in the class where it’s contained, but still expose an Observable to the other classes.

    See more

    Declaration

    Swift

    @propertyWrapper
    public class ReplaySubject<Element> : Subject<Element>
  • A Subject that must always have a value.

    You can use it as a property wrapper to make the publishing private in the class where it’s contained, but still expose an ObservableState to the other classes.

    See more

    Declaration

    Swift

    @propertyWrapper
    public class StateSubject<Element> : Subject<Element>
  • A Publisher that can be also subscribed to.

    You can use it as a property wrapper to make the publishing private in the class where it’s contained, but still expose an Observable to the other classes.

    See more

    Declaration

    Swift

    @propertyWrapper
    public class Subject<Element> : BasePublisher<Element>, Subscribable
  • A Subscribable implementation whereby only a single result is expected to be emitted to the subscriber.

    See more

    Declaration

    Swift

    public protocol Single<Element> : Subscribable
  • SingleResult From TealiumPrismCore

    A Single that completes with a Result<T, Error>.

    With a SingleResult you can subscribe as any other type of Single, but you can also subscribe only for onSuccess or onFailure to receive the event only in case the event is respectively either a success or a failure.

    So in case you want to handle both success and failure:

     single.subscribe { result in
          switch result {
           case let .success(output):
              // Handle success
              break
           case let .failure(error):
              // Handle failure
              break
     }
    

    In case you want to handle only successes:

     single.onSuccess { output in
       // Handle success
     }
    

    In case you want to handle only failures:

     single.onFailure { error in
       // Handle failure
     }
    

    Declaration

    Swift

    public typealias SingleResult<T, E> = any Single<Result<T, E>> where E : Error
  • A group that contains many disposable objects and disposes them simultaneously.

    See more

    Declaration

    Swift

    public protocol CompositeDisposable : Disposable
  • An protocol representing some long-lived operation that can be disposed.

    See more

    Declaration

    Swift

    public protocol Disposable
  • Contains factory methods for creating common Disposable instances for use with the Tealium SDK.

    See more

    Declaration

    Swift

    public enum Disposables
  • A protocol to provide all observable-like classes some utilities like subscribeOnce or the operators.

    See more

    Declaration

    Swift

    public protocol Subscribable<Element> : ObservableConvertible
  • An object from which you can extract an optional value.

    See more

    Declaration

    Swift

    public protocol ValueExtractor<ValueType>