SequenceType

protocol SequenceType
  • Converts a sequence to an observable sequence.

    Declaration

    Swift

    public func toObservable(scheduler: ImmediateSchedulerType? = nil) -> Observable<Generator.Element>

    Return Value

    The observable sequence whose elements are pulled from the given enumerable sequence.

  • Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully.

    This operator has tail recursive optimizations that will prevent stack overflow.

    Optimizations will be performed in cases equivalent to following:

    [1, [2, [3, .....].concat()].concat].concat()
    

    Declaration

    Swift

    public func concat()
            -> Observable<Generator.Element.E>

    Return Value

    An observable sequence that contains the elements of each given sequence, in sequential order.

  • Continues an observable sequence that is terminated by an error with the next observable sequence.

    Declaration

    Swift

    public func catchError()
            -> Observable<Generator.Element.E>

    Return Value

    An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully.

  • Propagates the observable sequence that reacts first.

    Declaration

    Swift

    public func amb()
            -> Observable<Generator.Element.E>

    Return Value

    An observable sequence that surfaces any of the given sequences, whichever reacted first.