Generic Structure

Publishers.MapKeyPath3

A publisher that publishes the values of three key paths as a tuple.

Declaration

struct MapKeyPath3<Upstream, Output0, Output1, Output2> where Upstream : Publisher

Topics

Type Aliases

typealias Publishers.MapKeyPath3.Failure

The kind of errors this publisher might publish.

typealias Publishers.MapKeyPath3.Output

A tuple of the kinds of values published by this publisher.

Instance Properties

let keyPath0: KeyPath<Upstream.Output, Output0>

The key path of a property to publish.

let keyPath1: KeyPath<Upstream.Output, Output1>

The key path of a second property to publish.

let keyPath2: KeyPath<Upstream.Output, Output2>

The key path of a third property to publish.

let upstream: Upstream

The publisher from which this publisher receives elements.

Instance Methods

func allSatisfy(((Output0, Output1, Output2)) -> Bool) -> Publishers.AllSatisfy<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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

func assign<Root>(to: ReferenceWritableKeyPath<Root, (Output0, Output1, Output2)>, on: Root) -> AnyCancellable

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

func collect() -> Publishers.Collect<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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

func collect(Int) -> Publishers.CollectByCount<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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

func combineLatest<P>(P) -> Publishers.CombineLatest<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>, 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.MapKeyPath3<Upstream, Output0, Output1, Output2>, P, Q>

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

func combineLatest<P, Q, R>(P, Q, R) -> Publishers.CombineLatest4<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>, P, Q, R>

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

func compactMap<T>(((Output0, Output1, Output2)) -> T?) -> Publishers.CompactMap<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>, T>

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

func count() -> Publishers.Count<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

Publishes the number of elements received from the upstream publisher.

func drop<P>(untilOutputFrom: P) -> Publishers.DropUntilOutput<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>, P>

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

func drop(while: ((Output0, Output1, Output2)) -> Bool) -> Publishers.DropWhile<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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

func dropFirst(Int) -> Publishers.Drop<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

Omits the specified number of elements before republishing subsequent elements.

func ignoreOutput() -> Publishers.IgnoreOutput<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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

func last() -> Publishers.Last<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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

func last(where: ((Output0, Output1, Output2)) -> Bool) -> Publishers.LastWhere<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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

func makeConnectable() -> Publishers.MakeConnectable<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

Creates a connectable wrapper around the publisher.

func merge(with: Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>) -> Publishers.MergeMany<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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.MapKeyPath3<Upstream, Output0, Output1, Output2>, 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.MapKeyPath3<Upstream, Output0, Output1, Output2>, 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.MapKeyPath3<Upstream, Output0, Output1, Output2>, 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.MapKeyPath3<Upstream, Output0, Output1, Output2>, 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.MapKeyPath3<Upstream, Output0, Output1, Output2>, 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.MapKeyPath3<Upstream, Output0, Output1, Output2>, 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 multicast<S>(() -> S) -> Publishers.Multicast<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>, S>

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

func output(at: Int) -> Publishers.Output<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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

func output<R>(in: R) -> Publishers.Output<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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

func reduce<T>(T, (T, (Output0, Output1, Output2)) -> T) -> Publishers.Reduce<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>, T>

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

func retry(Int) -> Publishers.Retry<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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, (Output0, Output1, Output2)) -> T) -> Publishers.Scan<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>, 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.MapKeyPath3<Upstream, Output0, Output1, Output2>, E>

Changes the failure type declared by the upstream publisher.

func sink(receiveValue: (((Output0, Output1, Output2)) -> 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 throttle<S>(for: S.SchedulerTimeType.Stride, scheduler: S, latest: Bool) -> Publishers.Throttle<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>, S>

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

func tryAllSatisfy(((Output0, Output1, Output2)) -> Bool) -> Publishers.TryAllSatisfy<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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

func tryCatch<P>((Upstream.Failure) -> P) -> Publishers.TryCatch<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>, P>

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

func tryCompactMap<T>(((Output0, Output1, Output2)) -> T?) -> Publishers.TryCompactMap<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>, T>

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

func tryDrop(while: ((Output0, Output1, Output2)) -> Bool) -> Publishers.TryDropWhile<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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

func tryLast(where: ((Output0, Output1, Output2)) -> Bool) -> Publishers.TryLastWhere<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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

func tryMap<T>(((Output0, Output1, Output2)) -> T) -> Publishers.TryMap<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>, T>

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

func tryMax(by: ((Output0, Output1, Output2), (Output0, Output1, Output2)) -> Bool) -> Publishers.TryComparison<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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

func tryMin(by: ((Output0, Output1, Output2), (Output0, Output1, Output2)) -> Bool) -> Publishers.TryComparison<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>>

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

func tryReduce<T>(T, (T, (Output0, Output1, Output2)) -> T) -> Publishers.TryReduce<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>, T>

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

func tryScan<T>(T, (T, (Output0, Output1, Output2)) -> T) -> Publishers.TryScan<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>, 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.MapKeyPath3<Upstream, Output0, Output1, Output2>, P>

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

func zip<P, Q>(P, Q) -> Publishers.Zip3<Publishers.MapKeyPath3<Upstream, Output0, Output1, Output2>, 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.MapKeyPath3<Upstream, Output0, Output1, Output2>, P, Q, R>

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

Relationships

Conforms To

See Also

Identifying Properties with Key Paths

struct Publishers.MapKeyPath

A publisher that publishes the value of a key path.

struct Publishers.MapKeyPath2

A publisher that publishes the values of two key paths as a tuple.