Generic Structure

Publishers.Merge5

A publisher created by applying the merge function to five upstream publishers.

Declaration

struct Merge5<A, B, C, D, E> where A : Publisher, B : Publisher, C : Publisher, D : Publisher, E : Publisher, A.Failure == B.Failure, A.Output == B.Output, B.Failure == C.Failure, B.Output == C.Output, C.Failure == D.Failure, C.Output == D.Output, D.Failure == E.Failure, D.Output == E.Output

Topics

Instance Methods

func allSatisfy((A.Output) -> Bool) -> Publishers.AllSatisfy<Publishers.Merge5<A, B, C, D, E>>

Publishes a single Boolean value that indicates whether all received elements pass a given predicate.

func assertNoFailure(String, file: StaticString, line: UInt) -> Publishers.AssertNoFailure<Publishers.Merge5<A, B, C, D, E>>

Raises a fatal error when its upstream publisher fails, and otherwise republishes all received input.

func assign<Root>(to: ReferenceWritableKeyPath<Root, A.Output>, on: Root) -> AnyCancellable

Assigns a publisher’s output to a property of an object.

func `catch`<P>((A.Failure) -> P) -> Publishers.Catch<Publishers.Merge5<A, B, C, D, E>, P>

Handles errors from an upstream publisher by replacing it with another publisher.

func collect() -> Publishers.Collect<Publishers.Merge5<A, B, C, D, E>>

Collects all received elements, and emits a single array of the collection when the upstream publisher finishes.

func collect(Int) -> Publishers.CollectByCount<Publishers.Merge5<A, B, C, D, E>>

Collects up to the specified number of elements, and then emits a single array of the collection.

func combineLatest<P>(P) -> Publishers.CombineLatest<Publishers.Merge5<A, B, C, D, E>, P>

Subscribes to an additional publisher and publishes a tuple upon receiving output from either publisher.

func combineLatest<P, Q>(P, Q) -> Publishers.CombineLatest3<Publishers.Merge5<A, B, C, D, E>, P, Q>

Subscribes to two additional publishers and publishes a tuple upon receiving output from any of the publishers.

func combineLatest<P, T>(P, (A.Output, P.Output) -> T) -> Publishers.Map<Publishers.CombineLatest<Publishers.Merge5<A, B, C, D, E>, P>, T>

Subscribes to an additional publisher and invokes a closure upon receiving output from either publisher.

func combineLatest<P, Q, R>(P, Q, R) -> Publishers.CombineLatest4<Publishers.Merge5<A, B, C, D, E>, P, Q, R>

Subscribes to three additional publishers and publishes a tuple upon receiving output from any of the publishers.

func combineLatest<P, Q, T>(P, Q, (A.Output, P.Output, Q.Output) -> T) -> Publishers.Map<Publishers.CombineLatest3<Publishers.Merge5<A, B, C, D, E>, P, Q>, T>

Subscribes to two additional publishers and invokes a closure upon receiving output from any of the publishers.

func compactMap<T>((A.Output) -> T?) -> Publishers.CompactMap<Publishers.Merge5<A, B, C, D, E>, T>

Calls a closure with each received element and publishes any returned optional that has a value.

func contains(A.Output) -> Publishers.Contains<Publishers.Merge5<A, B, C, D, E>>

Publishes a Boolean value upon receiving an element equal to the argument.

func contains(where: (A.Output) -> Bool) -> Publishers.ContainsWhere<Publishers.Merge5<A, B, C, D, E>>

Publishes a Boolean value upon receiving an element that satisfies the predicate closure.

func count() -> Publishers.Count<Publishers.Merge5<A, B, C, D, E>>

Publishes the number of elements received from the upstream publisher.

func drop<P>(untilOutputFrom: P) -> Publishers.DropUntilOutput<Publishers.Merge5<A, B, C, D, E>, P>

Ignores elements from the upstream publisher until it receives an element from a second publisher.

func drop(while: (A.Output) -> Bool) -> Publishers.DropWhile<Publishers.Merge5<A, B, C, D, E>>

Omits elements from the upstream publisher until a given closure returns false, before republishing all remaining elements.

func dropFirst(Int) -> Publishers.Drop<Publishers.Merge5<A, B, C, D, E>>

Omits the specified number of elements before republishing subsequent elements.

func encode<Coder>(encoder: Coder) -> Publishers.Encode<Publishers.Merge5<A, B, C, D, E>, Coder>

Encodes the output from upstream using a specified encoder.

func first() -> Publishers.First<Publishers.Merge5<A, B, C, D, E>>

Publishes the first element of a stream, then finishes.

func first(where: (A.Output) -> Bool) -> Publishers.FirstWhere<Publishers.Merge5<A, B, C, D, E>>

Publishes the first element of a stream to satisfy a predicate closure, then finishes.

func ignoreOutput() -> Publishers.IgnoreOutput<Publishers.Merge5<A, B, C, D, E>>

Ingores all upstream elements, but passes along a completion state (finished or failed).

func last() -> Publishers.Last<Publishers.Merge5<A, B, C, D, E>>

Publishes only the last element of a stream, after the stream finishes.

func last(where: (A.Output) -> Bool) -> Publishers.LastWhere<Publishers.Merge5<A, B, C, D, E>>

Publishes only the last element of a stream that satisfies a predicate closure, after the stream finishes.

func makeConnectable() -> Publishers.MakeConnectable<Publishers.Merge5<A, B, C, D, E>>

Creates a connectable wrapper around the publisher.

func map<T>((A.Output) -> T) -> Publishers.Map<Publishers.Merge5<A, B, C, D, E>, T>

Transforms all elements from the upstream publisher with a provided closure.

func mapError<E>((A.Failure) -> E) -> Publishers.MapError<Publishers.Merge5<A, B, C, D, E>, E>

Converts any failure from the upstream publisher into a new error.

func max() -> Publishers.Comparison<Publishers.Merge5<A, B, C, D, E>>

Publishes the maximum value received from the upstream publisher, after it finishes.

func max(by: (A.Output, A.Output) -> Bool) -> Publishers.Comparison<Publishers.Merge5<A, B, C, D, E>>

Publishes the maximum value received from the upstream publisher, using the provided ordering closure.

func measureInterval<S>(using: S, options: S.SchedulerOptions?) -> Publishers.MeasureInterval<Publishers.Merge5<A, B, C, D, E>, S>

Measures and emits the time interval between events received from an upstream publisher.

func merge(with: Publishers.Merge5<A, B, C, D, E>) -> Publishers.MergeMany<Publishers.Merge5<A, B, C, D, E>>

Combines elements from this publisher with those from another publisher of the same type, delivering an interleaved sequence of elements.

func merge<B, C>(with: B, C) -> Publishers.Merge3<Publishers.Merge5<A, B, C, D, E>, B, C>

Combines elements from this publisher with those from two other publishers, delivering an interleaved sequence of elements.

func merge<B, C, D>(with: B, C, D) -> Publishers.Merge4<Publishers.Merge5<A, B, C, D, E>, B, C, D>

Combines elements from this publisher with those from three other publishers, delivering an interleaved sequence of elements.

func merge<B, C, D, E>(with: B, C, D, E) -> Publishers.Merge5<Publishers.Merge5<A, B, C, D, E>, B, C, D, E>

Combines elements from this publisher with those from four other publishers, delivering an interleaved sequence of elements.

func merge<B, C, D, E, F>(with: B, C, D, E, F) -> Publishers.Merge6<Publishers.Merge5<A, B, C, D, E>, B, C, D, E, F>

Combines elements from this publisher with those from five other publishers, delivering an interleaved sequence of elements.

func merge<B, C, D, E, F, G>(with: B, C, D, E, F, G) -> Publishers.Merge7<Publishers.Merge5<A, B, C, D, E>, B, C, D, E, F, G>

Combines elements from this publisher with those from six other publishers, delivering an interleaved sequence of elements.

func merge<B, C, D, E, F, G, H>(with: B, C, D, E, F, G, H) -> Publishers.Merge8<Publishers.Merge5<A, B, C, D, E>, B, C, D, E, F, G, H>

Combines elements from this publisher with those from seven other publishers, delivering an interleaved sequence of elements.

func min() -> Publishers.Comparison<Publishers.Merge5<A, B, C, D, E>>

Publishes the minimum value received from the upstream publisher, after it finishes.

func min(by: (A.Output, A.Output) -> Bool) -> Publishers.Comparison<Publishers.Merge5<A, B, C, D, E>>

Publishes the minimum value received from the upstream publisher, after it finishes.

func multicast<S>(() -> S) -> Publishers.Multicast<Publishers.Merge5<A, B, C, D, E>, S>

Applies a closure to create a subject that delivers elements to subscribers.

func multicast<S>(subject: S) -> Publishers.Multicast<Publishers.Merge5<A, B, C, D, E>, S>

Provides a subject to deliver elements to multiple subscribers.

func output(at: Int) -> Publishers.Output<Publishers.Merge5<A, B, C, D, E>>

Publishes a specific element, indicated by its index in the sequence of published elements.

func output<R>(in: R) -> Publishers.Output<Publishers.Merge5<A, B, C, D, E>>

Publishes elements specified by their range in the sequence of published elements.

func prefix(Int) -> Publishers.Output<Publishers.Merge5<A, B, C, D, E>>

Republishes elements up to the specified maximum count.

func prefix(while: (A.Output) -> Bool) -> Publishers.PrefixWhile<Publishers.Merge5<A, B, C, D, E>>

Republishes elements while a predicate closure indicates publishing should continue.

func reduce<T>(T, (T, A.Output) -> T) -> Publishers.Reduce<Publishers.Merge5<A, B, C, D, E>, T>

Applies a closure that accumulates each element of a stream and publishes a final result upon completion.

func removeDuplicates() -> Publishers.RemoveDuplicates<Publishers.Merge5<A, B, C, D, E>>

Publishes only elements that don’t match the previous element.

func removeDuplicates(by: (A.Output, A.Output) -> Bool) -> Publishers.RemoveDuplicates<Publishers.Merge5<A, B, C, D, E>>

Publishes only elements that don’t match the previous element, as evaluated by a provided closure.

func replaceNil<T>(with: T) -> Publishers.Map<Publishers.Merge5<A, B, C, D, E>, T>

Replaces nil elements in the stream with the provided element.

func retry(Int) -> Publishers.Retry<Publishers.Merge5<A, B, C, D, E>>

Attempts to recreate a failed subscription with the upstream publisher using a specified number of attempts to establish the connection.

func scan<T>(T, (T, A.Output) -> T) -> Publishers.Scan<Publishers.Merge5<A, B, C, D, E>, T>

Transforms elements from the upstream publisher by providing the current element to a closure along with the last value returned by the closure.

func setFailureType<E>(to: E.Type) -> Publishers.SetFailureType<Publishers.Merge5<A, B, C, D, E>, E>

Changes the failure type declared by the upstream publisher.

func sink(receiveValue: ((A.Output) -> Void)) -> AnyCancellable

Attaches a subscriber with closure-based behavior to a publisher that never fails.

func subscribe<S>(S) -> AnyCancellable

Attaches the specified subject to this publisher.

func subscribe<S>(S)

Attaches the specified subscriber to this publisher.

func subscribe<S>(on: S, options: S.SchedulerOptions?) -> Publishers.SubscribeOn<Publishers.Merge5<A, B, C, D, E>, S>

Specifies the scheduler on which to perform subscribe, cancel, and request operations.

func switchToLatest() -> Publishers.SwitchToLatest<A.Output, Publishers.Merge5<A, B, C, D, E>>

Flattens the stream of events from multiple upstream publishers to appear as if they were coming from a single stream of events.

func throttle<S>(for: S.SchedulerTimeType.Stride, scheduler: S, latest: Bool) -> Publishers.Throttle<Publishers.Merge5<A, B, C, D, E>, S>

Publishes either the most-recent or first element published by the upstream publisher in the specified time interval.

func tryAllSatisfy((A.Output) -> Bool) -> Publishers.TryAllSatisfy<Publishers.Merge5<A, B, C, D, E>>

Publishes a single Boolean value that indicates whether all received elements pass a given error-throwing predicate.

func tryCatch<P>((A.Failure) -> P) -> Publishers.TryCatch<Publishers.Merge5<A, B, C, D, E>, P>

Handles errors from an upstream publisher by replacing it with another publisher or an error.

func tryCompactMap<T>((A.Output) -> T?) -> Publishers.TryCompactMap<Publishers.Merge5<A, B, C, D, E>, T>

Calls an error-throwing closure with each received element and publishes any returned optional that has a value.

func tryContains(where: (A.Output) -> Bool) -> Publishers.TryContainsWhere<Publishers.Merge5<A, B, C, D, E>>

Publishes a Boolean value upon receiving an element that satisfies the throwing predicate closure.

func tryDrop(while: (A.Output) -> Bool) -> Publishers.TryDropWhile<Publishers.Merge5<A, B, C, D, E>>

Omits elements from the upstream publisher until an error-throwing closure returns false, before republishing all remaining elements.

func tryFilter((A.Output) -> Bool) -> Publishers.TryFilter<Publishers.Merge5<A, B, C, D, E>>

Republishes all elements that match a provided error-throwing closure.

func tryFirst(where: (A.Output) -> Bool) -> Publishers.TryFirstWhere<Publishers.Merge5<A, B, C, D, E>>

Publishes the first element of a stream to satisfy a throwing predicate closure, then finishes.

func tryLast(where: (A.Output) -> Bool) -> Publishers.TryLastWhere<Publishers.Merge5<A, B, C, D, E>>

Publishes only the last element of a stream that satisfies an error-throwing predicate closure, after the stream finishes.

func tryMap<T>((A.Output) -> T) -> Publishers.TryMap<Publishers.Merge5<A, B, C, D, E>, T>

Transforms all elements from the upstream publisher with a provided error-throwing closure.

func tryMax(by: (A.Output, A.Output) -> Bool) -> Publishers.TryComparison<Publishers.Merge5<A, B, C, D, E>>

Publishes the maximum value received from the upstream publisher, using the provided error-throwing closure to order the items.

func tryMin(by: (A.Output, A.Output) -> Bool) -> Publishers.TryComparison<Publishers.Merge5<A, B, C, D, E>>

Publishes the minimum value received from the upstream publisher, using the provided error-throwing closure to order the items.

func tryPrefix(while: (A.Output) -> Bool) -> Publishers.TryPrefixWhile<Publishers.Merge5<A, B, C, D, E>>

Republishes elements while a error-throwing predicate closure indicates publishing should continue.

func tryReduce<T>(T, (T, A.Output) -> T) -> Publishers.TryReduce<Publishers.Merge5<A, B, C, D, E>, T>

Applies an error-throwing closure that accumulates each element of a stream and publishes a final result upon completion.

func tryRemoveDuplicates(by: (A.Output, A.Output) -> Bool) -> Publishers.TryRemoveDuplicates<Publishers.Merge5<A, B, C, D, E>>

Publishes only elements that don’t match the previous element, as evaluated by a provided error-throwing closure.

func tryScan<T>(T, (T, A.Output) -> T) -> Publishers.TryScan<Publishers.Merge5<A, B, C, D, E>, T>

Transforms elements from the upstream publisher by providing the current element to an error-throwing closure along with the last value returned by the closure.

func zip<P>(P) -> Publishers.Zip<Publishers.Merge5<A, B, C, D, E>, P>

Combines elements from another publisher and deliver pairs of elements as tuples.

func zip<P, Q>(P, Q) -> Publishers.Zip3<Publishers.Merge5<A, B, C, D, E>, P, Q>

Combines elements from two other publishers and delivers groups of elements as tuples.

func zip<P, Q, R>(P, Q, R) -> Publishers.Zip4<Publishers.Merge5<A, B, C, D, E>, P, Q, R>

Combines elements from three other publishers and delivers groups of elements as tuples.

Operator Functions

static func == (Publishers.Merge5<A, B, C, D, E>, Publishers.Merge5<A, B, C, D, E>) -> Bool

Returns a Boolean value that indicates whether two publishers are equivalent.

Relationships

Conforms To

  • Equatable

See Also

Combining Elements from Multiple Publishers

struct Publishers.CombineLatest

A publisher that receives and combines the latest elements from two publishers.

struct Publishers.CombineLatest3

A publisher that receives and combines the latest elements from three publishers.

struct Publishers.CombineLatest4

A publisher that receives and combines the latest elements from four publishers.

struct Publishers.Merge

A publisher created by applying the merge function to two upstream publishers.

struct Publishers.Merge3

A publisher created by applying the merge function to three upstream publishers.

struct Publishers.Merge4

A publisher created by applying the merge function to four upstream publishers.

struct Publishers.Merge6

A publisher created by applying the merge function to six upstream publishers.

struct Publishers.Merge7

A publisher created by applying the merge function to seven upstream publishers.

struct Publishers.Merge8

A publisher created by applying the merge function to eight upstream publishers.

struct Publishers.Zip

A publisher created by applying the zip function to two upstream publishers.

struct Publishers.Zip3

A publisher created by applying the zip function to three upstream publishers.

struct Publishers.Zip4

A publisher created by applying the zip function to four upstream publishers.