Generic Structure
Publishers .Prefix While A publisher that republishes elements while a predicate closure indicates publishing should continue.
SDKs
iOS 13.0+ macOS 10.15+ Mac Catalyst 13.0+ tvOS 13.0+ watchOS 6.0+ Xcode 11.0+ Declaration struct PrefixWhile <Upstream > where Upstream : Publisher
Topics
Instance Methods func combine Latest <P, Q, R, T>(P, Q, R, (Upstream .Output, P .Output, Q .Output, R .Output) -> T) -> Publishers .Map<Publishers .Combine Latest4<Publishers .Prefix While<Upstream>, P, Q, R>, T>
Subscribes to three additional publishers and invokes a closure upon receiving output from any of the publishers.
func map <T0, T1, T2>(Key Path<Upstream .Output, T0>, Key Path<Upstream .Output, T1>, Key Path<Upstream .Output, T2>) -> Publishers .Map Key Path3<Publishers .Prefix While<Upstream>, T0, T1, T2>
Publishes the values of three key paths as a tuple.
func merge <B, C, D, E>( with : B, C, D, E) -> Publishers .Merge5<Publishers .Prefix While<Upstream>, 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 .Prefix While<Upstream>, 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 .Prefix While<Upstream>, 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 .Prefix While<Upstream>, 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 zip <P, Q, R, T>(P, Q, R, (Upstream .Output, P .Output, Q .Output, R .Output) -> T) -> Publishers .Map<Publishers .Zip4<Publishers .Prefix While<Upstream>, P, Q, R>, T>
Combines elements from three other publishers and delivers a transformed output.
See Also
Applying Sequence Operations to Elements struct Publishers .Last Where
A publisher that only publishes the last element of a stream that satisfies a predicate closure, once the stream finishes.
struct Publishers .Drop
A publisher that omits a specified number of elements before republishing later elements.
struct Publishers .Last
A publisher that only publishes the last element of a stream, after the stream finishes.
struct Publishers .Try Last Where
A publisher that only publishes the last element of a stream that satisfies a error-throwing predicate closure, once the stream finishes.