docs/Protocols/PrimitiveSequenceType.html
public protocol PrimitiveSequenceType
Observable sequences containing 0 or 1 element
`
Trait
`
Additional constraints
Swift
associatedtype Trait
`
Element
`
Sequence element type
Swift
associatedtype Element
`
primitiveSequence
`
Swift
var primitiveSequence: PrimitiveSequence<Trait, Element> { get }
Observable sequence that represents self.
Trait == CompletableTrait, Element == Never`
andThen(_:)
` Extension method
Concatenates the second observable sequence to self upon successful termination of self.
Seealso
concat operator on reactivex.io
Swift
func andThen<Element>(_ second: Single<Element>) -> Single<Element>
| second |
Second observable sequence.
|
An observable sequence that contains the elements of self, followed by those of the second sequence.
`
andThen(_:)
` Extension method
Concatenates the second observable sequence to self upon successful termination of self.
Seealso
concat operator on reactivex.io
Swift
func andThen<Element>(_ second: Maybe<Element>) -> Maybe<Element>
| second |
Second observable sequence.
|
An observable sequence that contains the elements of self, followed by those of the second sequence.
`
andThen(_:)
` Extension method
Concatenates the second observable sequence to self upon successful termination of self.
Seealso
concat operator on reactivex.io
Swift
func andThen(_ second: Completable) -> Completable
| second |
Second observable sequence.
|
An observable sequence that contains the elements of self, followed by those of the second sequence.
`
andThen(_:)
` Extension method
Concatenates the second observable sequence to self upon successful termination of self.
Seealso
concat operator on reactivex.io
Swift
func andThen<Element>(_ second: Observable<Element>) -> Observable<Element>
| second |
Second observable sequence.
|
An observable sequence that contains the elements of self, followed by those of the second sequence.
Trait == CompletableTrait, Element == Swift.Never`
CompletableObserver
` Extension method
Undocumented
Swift
typealias CompletableObserver = (CompletableEvent) -> Void
`
create(subscribe:)
` Extension method
Creates an observable sequence from a specified subscribe method implementation.
Seealso
create operator on reactivex.io
Swift
static func create(subscribe: @escaping (@escaping CompletableObserver) -> Disposable) -> PrimitiveSequence<Trait, Element>
| subscribe |
Implementation of the resulting observable sequence’s subscribe method.
|
The observable sequence with the specified implementation for the subscribe method.
`
subscribe(_:)
` Extension method
Subscribes observer to receive events for this sequence.
Swift
func subscribe(_ observer: @escaping (CompletableEvent) -> Void) -> Disposable
Subscription for observer that can be used to cancel production of sequence elements and free resources.
`
subscribe(with:onCompleted:onError:onDisposed:)
` Extension method
Subscribes a completion handler and an error handler for this sequence.
Also, take in an object and provide an unretained, safe to use (i.e. not implicitly unwrapped), reference to it along with the events emitted by the sequence.
Note
If object can’t be retained, none of the other closures will be invoked.
Swift
func subscribe<Object: AnyObject>(
with object: Object,
onCompleted: ((Object) -> Void)? = nil,
onError: ((Object, Swift.Error) -> Void)? = nil,
onDisposed: ((Object) -> Void)? = nil
) -> Disposable
| object |
The object to provide an unretained reference on.
|
| onCompleted |
Action to invoke upon graceful termination of the observable sequence.
|
| onError |
Action to invoke upon errored termination of the observable sequence.
|
| onDisposed |
Action to invoke upon any type of termination of sequence (if the sequence has gracefully completed, errored, or if the generation is canceled by disposing subscription).
|
Subscription object used to unsubscribe from the observable sequence.
`
subscribe(onCompleted:onError:onDisposed:)
` Extension method
Subscribes a completion handler and an error handler for this sequence.
Swift
func subscribe(
onCompleted: (() -> Void)? = nil,
onError: ((Swift.Error) -> Void)? = nil,
onDisposed: (() -> Void)? = nil
) -> Disposable
| onCompleted |
Action to invoke upon graceful termination of the observable sequence.
|
| onError |
Action to invoke upon errored termination of the observable sequence.
|
| onDisposed |
Action to invoke upon any type of termination of sequence (if the sequence has gracefully completed, errored, or if the generation is canceled by disposing subscription).
|
Subscription object used to unsubscribe from the observable sequence.
`
error(_:)
` Extension method
Returns an observable sequence that terminates with an error.
Seealso
throw operator on reactivex.io
Swift
static func error(_ error: Swift.Error) -> Completable
The observable sequence that terminates with specified error.
`
never()
` Extension method
Returns a non-terminating observable sequence, which can be used to denote an infinite duration.
Seealso
never operator on reactivex.io
Swift
static func never() -> Completable
An observable sequence whose observers will never get called.
`
empty()
` Extension method
Returns an empty observable sequence, using the specified scheduler to send out the single Completed message.
Seealso
empty operator on reactivex.io
Swift
static func empty() -> Completable
An observable sequence with no elements.
`
do(onError:afterError:onCompleted:afterCompleted:onSubscribe:onSubscribed:onDispose:)
` Extension method
Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence.
Seealso
Swift
func `do`(
onError: ((Swift.Error) throws -> Void)? = nil,
afterError: ((Swift.Error) throws -> Void)? = nil,
onCompleted: (() throws -> Void)? = nil,
afterCompleted: (() throws -> Void)? = nil,
onSubscribe: (() -> Void)? = nil,
onSubscribed: (() -> Void)? = nil,
onDispose: (() -> Void)? = nil
)
-> Completable
| onNext |
Action to invoke for each element in the observable sequence.
|
| onError |
Action to invoke upon errored termination of the observable sequence.
|
| afterError |
Action to invoke after errored termination of the observable sequence.
|
| onCompleted |
Action to invoke upon graceful termination of the observable sequence.
|
| afterCompleted |
Action to invoke after graceful termination of the observable sequence.
|
| onSubscribe |
Action to invoke before subscribing to source observable sequence.
|
| onSubscribed |
Action to invoke after subscribing to source observable sequence.
|
| onDispose |
Action to invoke after subscription to source observable has been disposed for any reason. It can be either because sequence terminates for some reason or observer subscription being disposed.
|
The source sequence with the side-effecting behavior applied.
`
concat(_:)
` Extension method
Concatenates the second observable sequence to self upon successful termination of self.
Seealso
concat operator on reactivex.io
Swift
func concat(_ second: Completable) -> Completable
| second |
Second observable sequence.
|
An observable sequence that contains the elements of self, followed by those of the second sequence.
`
concat(_:)
` Extension method
Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully.
Seealso
concat operator on reactivex.io
Swift
static func concat<Sequence: Swift.Sequence>(_ sequence: Sequence) -> Completable
where Sequence.Element == Completable
An observable sequence that contains the elements of each given sequence, in sequential order.
`
concat(_:)
` Extension method
Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully.
Seealso
concat operator on reactivex.io
Swift
static func concat<Collection: Swift.Collection>(_ collection: Collection) -> Completable
where Collection.Element == Completable
An observable sequence that contains the elements of each given sequence, in sequential order.
`
concat(_:)
` Extension method
Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully.
Seealso
concat operator on reactivex.io
Swift
static func concat(_ sources: Completable...) -> Completable
An observable sequence that contains the elements of each given sequence, in sequential order.
`
zip(_:)
` Extension method
Merges the completion of all Completables from a collection into a single Completable.
Seealso
merge operator on reactivex.io
Note
For Completable, zip is an alias for merge.
Swift
static func zip<Collection: Swift.Collection>(_ sources: Collection) -> Completable
where Collection.Element == Completable
| sources |
Collection of Completables to merge.
|
A Completable that merges the completion of all Completables.
`
zip(_:)
` Extension method
Merges the completion of all Completables from an array into a single Completable.
Seealso
merge operator on reactivex.io
Note
For Completable, zip is an alias for merge.
Swift
static func zip(_ sources: [Completable]) -> Completable
| sources |
Array of observable sequences to merge.
|
A Completable that merges the completion of all Completables.
`
zip(_:)
` Extension method
Merges the completion of all Completables into a single Completable.
Seealso
merge operator on reactivex.io
Note
For Completable, zip is an alias for merge.
Swift
static func zip(_ sources: Completable...) -> Completable
| sources |
Collection of observable sequences to merge.
|
The observable sequence that merges the elements of the observable sequences.
Trait == MaybeTrait`
MaybeObserver
` Extension method
Undocumented
Swift
typealias MaybeObserver = (MaybeEvent<Element>) -> Void
`
create(subscribe:)
` Extension method
Creates an observable sequence from a specified subscribe method implementation.
Seealso
create operator on reactivex.io
Swift
static func create(subscribe: @escaping (@escaping MaybeObserver) -> Disposable) -> PrimitiveSequence<Trait, Element>
| subscribe |
Implementation of the resulting observable sequence’s subscribe method.
|
The observable sequence with the specified implementation for the subscribe method.
`
subscribe(_:)
` Extension method
Subscribes observer to receive events for this sequence.
Swift
func subscribe(_ observer: @escaping (MaybeEvent<Element>) -> Void) -> Disposable
Subscription for observer that can be used to cancel production of sequence elements and free resources.
`
subscribe(with:onSuccess:onError:onCompleted:onDisposed:)
` Extension method
Subscribes a success handler, an error handler, and a completion handler for this sequence.
Also, take in an object and provide an unretained, safe to use (i.e. not implicitly unwrapped), reference to it along with the events emitted by the sequence.
Note
If object can’t be retained, none of the other closures will be invoked.
Swift
func subscribe<Object: AnyObject>(
with object: Object,
onSuccess: ((Object, Element) -> Void)? = nil,
onError: ((Object, Swift.Error) -> Void)? = nil,
onCompleted: ((Object) -> Void)? = nil,
onDisposed: ((Object) -> Void)? = nil
) -> Disposable
| object |
The object to provide an unretained reference on.
|
| onSuccess |
Action to invoke for each element in the observable sequence.
|
| onError |
Action to invoke upon errored termination of the observable sequence.
|
| onCompleted |
Action to invoke upon graceful termination of the observable sequence.
|
| onDisposed |
Action to invoke upon any type of termination of sequence (if the sequence has gracefully completed, errored, or if the generation is canceled by disposing subscription).
|
Subscription object used to unsubscribe from the observable sequence.
`
subscribe(onSuccess:onError:onCompleted:onDisposed:)
` Extension method
Subscribes a success handler, an error handler, and a completion handler for this sequence.
Swift
func subscribe(
onSuccess: ((Element) -> Void)? = nil,
onError: ((Swift.Error) -> Void)? = nil,
onCompleted: (() -> Void)? = nil,
onDisposed: (() -> Void)? = nil
) -> Disposable
| onSuccess |
Action to invoke for each element in the observable sequence.
|
| onError |
Action to invoke upon errored termination of the observable sequence.
|
| onCompleted |
Action to invoke upon graceful termination of the observable sequence.
|
| onDisposed |
Action to invoke upon any type of termination of sequence (if the sequence has gracefully completed, errored, or if the generation is canceled by disposing subscription).
|
Subscription object used to unsubscribe from the observable sequence.
`
just(_:)
` Extension method
Returns an observable sequence that contains a single element.
Seealso
Swift
static func just(_ element: Element) -> Maybe<Element>
| element |
Single element in the resulting observable sequence.
|
An observable sequence containing the single specified element.
`
just(_:scheduler:)
` Extension method
Returns an observable sequence that contains a single element.
Seealso
Swift
static func just(_ element: Element, scheduler: ImmediateSchedulerType) -> Maybe<Element>
| element |
Single element in the resulting observable sequence.
|
| scheduler |
Scheduler to send the single element on.
|
An observable sequence containing the single specified element.
`
error(_:)
` Extension method
Returns an observable sequence that terminates with an error.
Seealso
throw operator on reactivex.io
Swift
static func error(_ error: Swift.Error) -> Maybe<Element>
The observable sequence that terminates with specified error.
`
never()
` Extension method
Returns a non-terminating observable sequence, which can be used to denote an infinite duration.
Seealso
never operator on reactivex.io
Swift
static func never() -> Maybe<Element>
An observable sequence whose observers will never get called.
`
empty()
` Extension method
Returns an empty observable sequence, using the specified scheduler to send out the single Completed message.
Seealso
empty operator on reactivex.io
Swift
static func empty() -> Maybe<Element>
An observable sequence with no elements.
`
do(onNext:afterNext:onError:afterError:onCompleted:afterCompleted:onSubscribe:onSubscribed:onDispose:)
` Extension method
Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence.
Seealso
Swift
func `do`(
onNext: ((Element) throws -> Void)? = nil,
afterNext: ((Element) throws -> Void)? = nil,
onError: ((Swift.Error) throws -> Void)? = nil,
afterError: ((Swift.Error) throws -> Void)? = nil,
onCompleted: (() throws -> Void)? = nil,
afterCompleted: (() throws -> Void)? = nil,
onSubscribe: (() -> Void)? = nil,
onSubscribed: (() -> Void)? = nil,
onDispose: (() -> Void)? = nil
)
-> Maybe<Element>
| onNext |
Action to invoke for each element in the observable sequence.
|
| afterNext |
Action to invoke for each element after the observable has passed an onNext event along to its downstream.
|
| onError |
Action to invoke upon errored termination of the observable sequence.
|
| afterError |
Action to invoke after errored termination of the observable sequence.
|
| onCompleted |
Action to invoke upon graceful termination of the observable sequence.
|
| afterCompleted |
Action to invoke after graceful termination of the observable sequence.
|
| onSubscribe |
Action to invoke before subscribing to source observable sequence.
|
| onSubscribed |
Action to invoke after subscribing to source observable sequence.
|
| onDispose |
Action to invoke after subscription to source observable has been disposed for any reason. It can be either because sequence terminates for some reason or observer subscription being disposed.
|
The source sequence with the side-effecting behavior applied.
`
filter(_:)
` Extension method
Filters the elements of an observable sequence based on a predicate.
Seealso
filter operator on reactivex.io
Swift
func filter(_ predicate: @escaping (Element) throws -> Bool)
-> Maybe<Element>
| predicate |
A function to test each source element for a condition.
|
An observable sequence that contains elements from the input sequence that satisfy the condition.
`
map(_:)
` Extension method
Projects each element of an observable sequence into a new form.
Seealso
Swift
func map<Result>(_ transform: @escaping (Element) throws -> Result)
-> Maybe<Result>
| transform |
A transform function to apply to each source element.
|
An observable sequence whose elements are the result of invoking the transform function on each element of source.
`
compactMap(_:)
` Extension method
Projects each element of an observable sequence into an optional form and filters all optional results.
Swift
func compactMap<Result>(_ transform: @escaping (Element) throws -> Result?)
-> Maybe<Result>
| transform |
A transform function to apply to each source element.
|
An observable sequence whose elements are the result of filtering the transform function for each element of the source.
`
flatMap(_:)
` Extension method
Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
Seealso
flatMap operator on reactivex.io
Swift
func flatMap<Result>(_ selector: @escaping (Element) throws -> Maybe<Result>)
-> Maybe<Result>
| selector |
A transform function to apply to each element.
|
An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.
`
ifEmpty(default:)
` Extension method
Emits elements from the source observable sequence, or a default element if the source observable sequence is empty.
Seealso
DefaultIfEmpty operator on reactivex.io
Swift
func ifEmpty(default: Element) -> Single<Element>
| default |
Default element to be sent if the source does not emit any elements
|
An observable sequence which emits default element end completes in case the original sequence is empty
`
ifEmpty(switchTo:)
` Extension method
Returns the elements of the specified sequence or other sequence if the sequence is empty.
Seealso
DefaultIfEmpty operator on reactivex.io
Swift
func ifEmpty(switchTo other: Maybe<Element>) -> Maybe<Element>
| other |
Observable sequence being returned when source sequence is empty.
|
Observable sequence that contains elements from switchTo sequence if source is empty, otherwise returns source sequence elements.
`
ifEmpty(switchTo:)
` Extension method
Returns the elements of the specified sequence or other sequence if the sequence is empty.
Seealso
DefaultIfEmpty operator on reactivex.io
Swift
func ifEmpty(switchTo other: Single<Element>) -> Single<Element>
| other |
Observable sequence being returned when source sequence is empty.
|
Observable sequence that contains elements from switchTo sequence if source is empty, otherwise returns source sequence elements.
`
catchAndReturn(_:)
` Extension method
Continues an observable sequence that is terminated by an error with a single element.
Seealso
catch operator on reactivex.io
Swift
func catchAndReturn(_ element: Element)
-> PrimitiveSequence<Trait, Element>
| element |
Last element in an observable sequence in case error occurs.
|
An observable sequence containing the source sequence’s elements, followed by the element in case an error occurred.
`
catchErrorJustReturn(_:)
` Extension method
Continues an observable sequence that is terminated by an error with a single element.
Seealso
catch operator on reactivex.io
Swift
@available(*, deprecated, renamed: "catchAndReturn(_:﹚")
func catchErrorJustReturn(_ element: Element)
-> PrimitiveSequence<Trait, Element>
| element |
Last element in an observable sequence in case error occurs.
|
An observable sequence containing the source sequence’s elements, followed by the element in case an error occurred.
Trait == SingleTrait`
create(detached:priority:work:)
` Extension method
Creates a Single from the result of an asynchronous operation
Seealso
create operator on reactivex.io
Swift
@_disfavoredOverload
static func create(
detached: Bool = false,
priority: TaskPriority? = nil,
work: @Sendable @escaping () async throws -> Element
) -> PrimitiveSequence<Trait, Element>
| work |
An async closure expected to return an element of type Element
|
A Single of the async closure’s element type
`
value
` Extension method, asynchronous
Allows awaiting the success or failure of this Single asynchronously via Swift’s concurrency features (async/await)
A sample usage would look like so:
do {
let value = try await single.value
} catch {
// Handle error
}
Swift
var value: Element { get async throws }
Trait == MaybeTrait`
value
` Extension method, asynchronous
Allows awaiting the success or failure of this Maybe asynchronously via Swift’s concurrency features (async/await)
If the Maybe completes without emitting a value, it would return a nil value to indicate so.
A sample usage would look like so:
do {
let value = try await maybe.value // Element?
} catch {
// Handle error
}
Swift
var value: Element? { get async throws }
Trait == CompletableTrait, Element == Never`
value
` Extension method, asynchronous
Allows awaiting the success or failure of this Completable asynchronously via Swift’s concurrency features (async/await)
Upon completion, a Void will be returned
A sample usage would look like so:
do {
let value = try await completable.value // Void
} catch {
// Handle error
}
Swift
var value: Void { get async throws }
Trait == SingleTrait`
zip(_:_:resultSelector:)
` Extension method
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, resultSelector: @escaping (E1, E2) throws -> Element)
-> PrimitiveSequence<Trait, Element>
| resultSelector |
Function to invoke for each series of elements at corresponding indexes in the sources.
|
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Element == Any, Trait == SingleTrait`
zip(_:_:)
` Extension method
Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>)
-> PrimitiveSequence<Trait, (E1, E2)>
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Trait == MaybeTrait`
zip(_:_:resultSelector:)
` Extension method
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, resultSelector: @escaping (E1, E2) throws -> Element)
-> PrimitiveSequence<Trait, Element>
| resultSelector |
Function to invoke for each series of elements at corresponding indexes in the sources.
|
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Element == Any, Trait == MaybeTrait`
zip(_:_:)
` Extension method
Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>)
-> PrimitiveSequence<Trait, (E1, E2)>
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Trait == SingleTrait`
zip(_:_:_:resultSelector:)
` Extension method
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, resultSelector: @escaping (E1, E2, E3) throws -> Element)
-> PrimitiveSequence<Trait, Element>
| resultSelector |
Function to invoke for each series of elements at corresponding indexes in the sources.
|
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Element == Any, Trait == SingleTrait`
zip(_:_:_:)
` Extension method
Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>)
-> PrimitiveSequence<Trait, (E1, E2, E3)>
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Trait == MaybeTrait`
zip(_:_:_:resultSelector:)
` Extension method
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, resultSelector: @escaping (E1, E2, E3) throws -> Element)
-> PrimitiveSequence<Trait, Element>
| resultSelector |
Function to invoke for each series of elements at corresponding indexes in the sources.
|
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Element == Any, Trait == MaybeTrait`
zip(_:_:_:)
` Extension method
Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>)
-> PrimitiveSequence<Trait, (E1, E2, E3)>
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Trait == SingleTrait`
zip(_:_:_:_:resultSelector:)
` Extension method
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, resultSelector: @escaping (E1, E2, E3, E4) throws -> Element)
-> PrimitiveSequence<Trait, Element>
| resultSelector |
Function to invoke for each series of elements at corresponding indexes in the sources.
|
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Element == Any, Trait == SingleTrait`
zip(_:_:_:_:)
` Extension method
Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>)
-> PrimitiveSequence<Trait, (E1, E2, E3, E4)>
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Trait == MaybeTrait`
zip(_:_:_:_:resultSelector:)
` Extension method
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, resultSelector: @escaping (E1, E2, E3, E4) throws -> Element)
-> PrimitiveSequence<Trait, Element>
| resultSelector |
Function to invoke for each series of elements at corresponding indexes in the sources.
|
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Element == Any, Trait == MaybeTrait`
zip(_:_:_:_:)
` Extension method
Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>)
-> PrimitiveSequence<Trait, (E1, E2, E3, E4)>
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Trait == SingleTrait`
zip(_:_:_:_:_:resultSelector:)
` Extension method
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>, resultSelector: @escaping (E1, E2, E3, E4, E5) throws -> Element)
-> PrimitiveSequence<Trait, Element>
| resultSelector |
Function to invoke for each series of elements at corresponding indexes in the sources.
|
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Element == Any, Trait == SingleTrait`
zip(_:_:_:_:_:)
` Extension method
Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>)
-> PrimitiveSequence<Trait, (E1, E2, E3, E4, E5)>
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Trait == MaybeTrait`
zip(_:_:_:_:_:resultSelector:)
` Extension method
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>, resultSelector: @escaping (E1, E2, E3, E4, E5) throws -> Element)
-> PrimitiveSequence<Trait, Element>
| resultSelector |
Function to invoke for each series of elements at corresponding indexes in the sources.
|
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Element == Any, Trait == MaybeTrait`
zip(_:_:_:_:_:)
` Extension method
Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>)
-> PrimitiveSequence<Trait, (E1, E2, E3, E4, E5)>
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Trait == SingleTrait`
zip(_:_:_:_:_:_:resultSelector:)
` Extension method
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5, E6>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>, _ source6: PrimitiveSequence<Trait, E6>, resultSelector: @escaping (E1, E2, E3, E4, E5, E6) throws -> Element)
-> PrimitiveSequence<Trait, Element>
| resultSelector |
Function to invoke for each series of elements at corresponding indexes in the sources.
|
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Element == Any, Trait == SingleTrait`
zip(_:_:_:_:_:_:)
` Extension method
Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5, E6>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>, _ source6: PrimitiveSequence<Trait, E6>)
-> PrimitiveSequence<Trait, (E1, E2, E3, E4, E5, E6)>
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Trait == MaybeTrait`
zip(_:_:_:_:_:_:resultSelector:)
` Extension method
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5, E6>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>, _ source6: PrimitiveSequence<Trait, E6>, resultSelector: @escaping (E1, E2, E3, E4, E5, E6) throws -> Element)
-> PrimitiveSequence<Trait, Element>
| resultSelector |
Function to invoke for each series of elements at corresponding indexes in the sources.
|
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Element == Any, Trait == MaybeTrait`
zip(_:_:_:_:_:_:)
` Extension method
Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5, E6>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>, _ source6: PrimitiveSequence<Trait, E6>)
-> PrimitiveSequence<Trait, (E1, E2, E3, E4, E5, E6)>
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Trait == SingleTrait`
zip(_:_:_:_:_:_:_:resultSelector:)
` Extension method
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5, E6, E7>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>, _ source6: PrimitiveSequence<Trait, E6>, _ source7: PrimitiveSequence<Trait, E7>, resultSelector: @escaping (E1, E2, E3, E4, E5, E6, E7) throws -> Element)
-> PrimitiveSequence<Trait, Element>
| resultSelector |
Function to invoke for each series of elements at corresponding indexes in the sources.
|
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Element == Any, Trait == SingleTrait`
zip(_:_:_:_:_:_:_:)
` Extension method
Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5, E6, E7>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>, _ source6: PrimitiveSequence<Trait, E6>, _ source7: PrimitiveSequence<Trait, E7>)
-> PrimitiveSequence<Trait, (E1, E2, E3, E4, E5, E6, E7)>
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Trait == MaybeTrait`
zip(_:_:_:_:_:_:_:resultSelector:)
` Extension method
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5, E6, E7>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>, _ source6: PrimitiveSequence<Trait, E6>, _ source7: PrimitiveSequence<Trait, E7>, resultSelector: @escaping (E1, E2, E3, E4, E5, E6, E7) throws -> Element)
-> PrimitiveSequence<Trait, Element>
| resultSelector |
Function to invoke for each series of elements at corresponding indexes in the sources.
|
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Element == Any, Trait == MaybeTrait`
zip(_:_:_:_:_:_:_:)
` Extension method
Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5, E6, E7>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>, _ source6: PrimitiveSequence<Trait, E6>, _ source7: PrimitiveSequence<Trait, E7>)
-> PrimitiveSequence<Trait, (E1, E2, E3, E4, E5, E6, E7)>
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Trait == SingleTrait`
zip(_:_:_:_:_:_:_:_:resultSelector:)
` Extension method
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5, E6, E7, E8>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>, _ source6: PrimitiveSequence<Trait, E6>, _ source7: PrimitiveSequence<Trait, E7>, _ source8: PrimitiveSequence<Trait, E8>, resultSelector: @escaping (E1, E2, E3, E4, E5, E6, E7, E8) throws -> Element)
-> PrimitiveSequence<Trait, Element>
| resultSelector |
Function to invoke for each series of elements at corresponding indexes in the sources.
|
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Element == Any, Trait == SingleTrait`
zip(_:_:_:_:_:_:_:_:)
` Extension method
Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5, E6, E7, E8>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>, _ source6: PrimitiveSequence<Trait, E6>, _ source7: PrimitiveSequence<Trait, E7>, _ source8: PrimitiveSequence<Trait, E8>)
-> PrimitiveSequence<Trait, (E1, E2, E3, E4, E5, E6, E7, E8)>
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Trait == MaybeTrait`
zip(_:_:_:_:_:_:_:_:resultSelector:)
` Extension method
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5, E6, E7, E8>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>, _ source6: PrimitiveSequence<Trait, E6>, _ source7: PrimitiveSequence<Trait, E7>, _ source8: PrimitiveSequence<Trait, E8>, resultSelector: @escaping (E1, E2, E3, E4, E5, E6, E7, E8) throws -> Element)
-> PrimitiveSequence<Trait, Element>
| resultSelector |
Function to invoke for each series of elements at corresponding indexes in the sources.
|
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Element == Any, Trait == MaybeTrait`
zip(_:_:_:_:_:_:_:_:)
` Extension method
Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index.
Seealso
Swift
static func zip<E1, E2, E3, E4, E5, E6, E7, E8>(_ source1: PrimitiveSequence<Trait, E1>, _ source2: PrimitiveSequence<Trait, E2>, _ source3: PrimitiveSequence<Trait, E3>, _ source4: PrimitiveSequence<Trait, E4>, _ source5: PrimitiveSequence<Trait, E5>, _ source6: PrimitiveSequence<Trait, E6>, _ source7: PrimitiveSequence<Trait, E7>, _ source8: PrimitiveSequence<Trait, E8>)
-> PrimitiveSequence<Trait, (E1, E2, E3, E4, E5, E6, E7, E8)>
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
Element: RxAbstractInteger`
timer(_:scheduler:)
` Extension method
Returns an observable sequence that periodically produces a value after the specified initial relative due time has elapsed, using the specified scheduler to run timers.
Seealso
timer operator on reactivex.io
Swift
static func timer(_ dueTime: RxTimeInterval, scheduler: SchedulerType)
-> PrimitiveSequence<Trait, Element>
| dueTime |
Relative time at which to produce the first value.
|
| scheduler |
Scheduler to run timers on.
|
An observable sequence that produces a value after due time has elapsed and then each period.
Trait == SingleTrait`
SingleObserver
` Extension method
Undocumented
Swift
typealias SingleObserver = (SingleEvent<Element>) -> Void
`
create(subscribe:)
` Extension method
Creates an observable sequence from a specified subscribe method implementation.
Seealso
create operator on reactivex.io
Swift
static func create(subscribe: @escaping (@escaping SingleObserver) -> Disposable) -> Single<Element>
| subscribe |
Implementation of the resulting observable sequence’s subscribe method.
|
The observable sequence with the specified implementation for the subscribe method.
`
subscribe(_:)
` Extension method
Subscribes observer to receive events for this sequence.
Swift
func subscribe(_ observer: @escaping (SingleEvent<Element>) -> Void) -> Disposable
Subscription for observer that can be used to cancel production of sequence elements and free resources.
`
subscribe(onSuccess:onError:onDisposed:)
` Extension method
Subscribes a success handler, and an error handler for this sequence.
Swift
@available(*, deprecated, renamed: "subscribe(onSuccess:onFailure:onDisposed:﹚")
func subscribe(
onSuccess: ((Element) -> Void)? = nil,
onError: @escaping ((Swift.Error) -> Void),
onDisposed: (() -> Void)? = nil
) -> Disposable
| onSuccess |
Action to invoke for each element in the observable sequence.
|
| onError |
Action to invoke upon errored termination of the observable sequence.
|
| onDisposed |
Action to invoke upon any type of termination of sequence (if the sequence has gracefully completed, errored, or if the generation is canceled by disposing subscription).
|
Subscription object used to unsubscribe from the observable sequence.
`
subscribe(with:onSuccess:onFailure:onDisposed:)
` Extension method
Subscribes a success handler, and an error handler for this sequence.
Also, take in an object and provide an unretained, safe to use (i.e. not implicitly unwrapped), reference to it along with the events emitted by the sequence.
Note
If object can’t be retained, none of the other closures will be invoked.
Swift
func subscribe<Object: AnyObject>(
with object: Object,
onSuccess: ((Object, Element) -> Void)? = nil,
onFailure: ((Object, Swift.Error) -> Void)? = nil,
onDisposed: ((Object) -> Void)? = nil
) -> Disposable
| object |
The object to provide an unretained reference on.
|
| onSuccess |
Action to invoke for each element in the observable sequence.
|
| onFailure |
Action to invoke upon errored termination of the observable sequence.
|
| onDisposed |
Action to invoke upon any type of termination of sequence (if the sequence has gracefully completed, errored, or if the generation is canceled by disposing subscription).
|
Subscription object used to unsubscribe from the observable sequence.
`
subscribe(onSuccess:onFailure:onDisposed:)
` Extension method
Subscribes a success handler, and an error handler for this sequence.
Swift
func subscribe(
onSuccess: ((Element) -> Void)? = nil,
onFailure: ((Swift.Error) -> Void)? = nil,
onDisposed: (() -> Void)? = nil
) -> Disposable
| onSuccess |
Action to invoke for each element in the observable sequence.
|
| onFailure |
Action to invoke upon errored termination of the observable sequence.
|
| onDisposed |
Action to invoke upon any type of termination of sequence (if the sequence has gracefully completed, errored, or if the generation is canceled by disposing subscription).
|
Subscription object used to unsubscribe from the observable sequence.
`
just(_:)
` Extension method
Returns an observable sequence that contains a single element.
Seealso
Swift
static func just(_ element: Element) -> Single<Element>
| element |
Single element in the resulting observable sequence.
|
An observable sequence containing the single specified element.
`
just(_:scheduler:)
` Extension method
Returns an observable sequence that contains a single element.
Seealso
Swift
static func just(_ element: Element, scheduler: ImmediateSchedulerType) -> Single<Element>
| element |
Single element in the resulting observable sequence.
|
| scheduler |
Scheduler to send the single element on.
|
An observable sequence containing the single specified element.
`
error(_:)
` Extension method
Returns an observable sequence that terminates with an error.
Seealso
throw operator on reactivex.io
Swift
static func error(_ error: Swift.Error) -> Single<Element>
The observable sequence that terminates with specified error.
`
never()
` Extension method
Returns a non-terminating observable sequence, which can be used to denote an infinite duration.
Seealso
never operator on reactivex.io
Swift
static func never() -> Single<Element>
An observable sequence whose observers will never get called.
`
do(onSuccess:afterSuccess:onError:afterError:onSubscribe:onSubscribed:onDispose:)
` Extension method
Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence.
Seealso
Swift
func `do`(
onSuccess: ((Element) throws -> Void)? = nil,
afterSuccess: ((Element) throws -> Void)? = nil,
onError: ((Swift.Error) throws -> Void)? = nil,
afterError: ((Swift.Error) throws -> Void)? = nil,
onSubscribe: (() -> Void)? = nil,
onSubscribed: (() -> Void)? = nil,
onDispose: (() -> Void)? = nil
)
-> Single<Element>
| onSuccess |
Action to invoke for each element in the observable sequence.
|
| afterSuccess |
Action to invoke for each element after the observable has passed an onNext event along to its downstream.
|
| onError |
Action to invoke upon errored termination of the observable sequence.
|
| afterError |
Action to invoke after errored termination of the observable sequence.
|
| onSubscribe |
Action to invoke before subscribing to source observable sequence.
|
| onSubscribed |
Action to invoke after subscribing to source observable sequence.
|
| onDispose |
Action to invoke after subscription to source observable has been disposed for any reason. It can be either because sequence terminates for some reason or observer subscription being disposed.
|
The source sequence with the side-effecting behavior applied.
`
filter(_:)
` Extension method
Filters the elements of an observable sequence based on a predicate.
Seealso
filter operator on reactivex.io
Swift
func filter(_ predicate: @escaping (Element) throws -> Bool)
-> Maybe<Element>
| predicate |
A function to test each source element for a condition.
|
An observable sequence that contains elements from the input sequence that satisfy the condition.
`
map(_:)
` Extension method
Projects each element of an observable sequence into a new form.
Seealso
Swift
func map<Result>(_ transform: @escaping (Element) throws -> Result)
-> Single<Result>
| transform |
A transform function to apply to each source element.
|
An observable sequence whose elements are the result of invoking the transform function on each element of source.
`
compactMap(_:)
` Extension method
Projects each element of an observable sequence into an optional form and filters all optional results.
Swift
func compactMap<Result>(_ transform: @escaping (Element) throws -> Result?)
-> Maybe<Result>
| transform |
A transform function to apply to each source element.
|
An observable sequence whose elements are the result of filtering the transform function for each element of the source.
`
flatMap(_:)
` Extension method
Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
Seealso
flatMap operator on reactivex.io
Swift
func flatMap<Result>(_ selector: @escaping (Element) throws -> Single<Result>)
-> Single<Result>
| selector |
A transform function to apply to each element.
|
An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.
`
flatMapMaybe(_:)
` Extension method
Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
Seealso
flatMap operator on reactivex.io
Swift
func flatMapMaybe<Result>(_ selector: @escaping (Element) throws -> Maybe<Result>)
-> Maybe<Result>
| selector |
A transform function to apply to each element.
|
An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.
`
flatMapCompletable(_:)
` Extension method
Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
Seealso
flatMap operator on reactivex.io
Swift
func flatMapCompletable(_ selector: @escaping (Element) throws -> Completable)
-> Completable
| selector |
A transform function to apply to each element.
|
An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.
`
zip(_:resultSelector:)
` Extension method
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
Swift
static func zip<Collection, Result>(_ collection: Collection, resultSelector: @escaping ([Element]) throws -> Result) -> PrimitiveSequence<Trait, Result> where Collection : Collection, Collection.Element == PrimitiveSequence<SingleTrait, Self.Element>
| resultSelector |
Function to invoke for each series of elements at corresponding indexes in the sources.
|
An observable sequence containing the result of combining elements of the sources using the specified result selector function.
`
zip(_:)
` Extension method
Merges the specified observable sequences into one observable sequence all of the observable sequences have produced an element at a corresponding index.
Swift
static func zip<Collection>(_ collection: Collection) -> PrimitiveSequence<Trait, [Element]> where Collection : Collection, Collection.Element == PrimitiveSequence<SingleTrait, Self.Element>
An observable sequence containing the result of combining elements of the sources.
`
catchAndReturn(_:)
` Extension method
Continues an observable sequence that is terminated by an error with a single element.
Seealso
catch operator on reactivex.io
Swift
func catchAndReturn(_ element: Element)
-> PrimitiveSequence<Trait, Element>
| element |
Last element in an observable sequence in case error occurs.
|
An observable sequence containing the source sequence’s elements, followed by the element in case an error occurred.
`
catchErrorJustReturn(_:)
` Extension method
Continues an observable sequence that is terminated by an error with a single element.
Seealso
catch operator on reactivex.io
Swift
@available(*, deprecated, renamed: "catchAndReturn(_:﹚")
func catchErrorJustReturn(_ element: Element)
-> PrimitiveSequence<Trait, Element>
| element |
Last element in an observable sequence in case error occurs.
|
An observable sequence containing the source sequence’s elements, followed by the element in case an error occurred.
`
asMaybe()
` Extension method
Converts self to Maybe trait.
Swift
func asMaybe() -> Maybe<Element>
Maybe trait that represents self.
`
asCompletable()
` Extension method
Converts self to Completable trait, ignoring its emitted value if one exists.
Swift
func asCompletable() -> Completable
Completable trait that represents self.