GroupedObservable

public struct GroupedObservable<Key, Element> : ObservableType

Represents an observable sequence of elements that have a common key.

  • key

    Gets the common key.

    Declaration

    Swift

    public let key: Key
  • Initializes grouped observable sequence with key and source observable sequence.

    Declaration

    Swift

    public init(key: Key, source: Observable<Element>)

    Parameters

    key

    Grouped observable sequence key

    source

    Observable sequence that represents sequence of elements for the key

    Return Value

    Grouped observable sequence of elements for the specific key

  • Subscribes observer to receive events for this sequence.

    Declaration

    Swift

    public func subscribe<Observer>(_ observer: Observer) -> Disposable where Element == Observer.Element, Observer : ObserverType
  • Converts self to Observable sequence.

    Declaration

    Swift

    public func asObservable() -> Observable<Element>