-
Notifications
You must be signed in to change notification settings - Fork 1
/
combine.swiftinterface
2641 lines (2635 loc) · 165 KB
/
combine.swiftinterface
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// From /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Combine.framework/Versions/A/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.7.1 (swiftlang-5.7.1.134.3 clang-1400.0.29.51)
// swift-module-flags: -target x86_64-apple-ios16.2-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -library-level api -enable-library-evolution -enable-library-evolution -enable-library-evolution -enable-library-evolution -enable-library-evolution -module-name Combine -disable-availability-checking
// swift-module-flags-ignorable: -enable-bare-slash-regex -user-module-version 310
import Darwin
import Swift
import _Concurrency
import _StringProcessing
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func multicast<S>(_ createSubject: @escaping () -> S) -> Combine.Publishers.Multicast<Self, S> where S : Combine.Subject, Self.Failure == S.Failure, Self.Output == S.Output
public func multicast<S>(subject: S) -> Combine.Publishers.Multicast<Self, S> where S : Combine.Subject, Self.Failure == S.Failure, Self.Output == S.Output
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
final public class Multicast<Upstream, SubjectType> : Combine.ConnectablePublisher where Upstream : Combine.Publisher, SubjectType : Combine.Subject, Upstream.Failure == SubjectType.Failure, Upstream.Output == SubjectType.Output {
public typealias Output = Upstream.Output
public typealias Failure = Upstream.Failure
final public let upstream: Upstream
final public let createSubject: () -> SubjectType
public init(upstream: Upstream, createSubject: @escaping () -> SubjectType)
@objc deinit
final public func receive<S>(subscriber: S) where S : Combine.Subscriber, SubjectType.Failure == S.Failure, SubjectType.Output == S.Input
final public func connect() -> Combine.Cancellable
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public protocol Cancellable {
func cancel()
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public protocol Subscription : Combine.Cancellable, Combine.CustomCombineIdentifierConvertible {
func request(_ demand: Combine.Subscribers.Demand)
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public enum Subscriptions {
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Subscriptions {
public static var empty: Combine.Subscription {
get
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
final public class AnyCancellable : Combine.Cancellable, Swift.Hashable {
public init(_ cancel: @escaping () -> Swift.Void)
public init<C>(_ canceller: C) where C : Combine.Cancellable
@objc deinit
final public func cancel()
final public func hash(into hasher: inout Swift.Hasher)
public static func == (lhs: Combine.AnyCancellable, rhs: Combine.AnyCancellable) -> Swift.Bool
final public var hashValue: Swift.Int {
get
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.AnyCancellable {
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
final public func store<C>(in collection: inout C) where C : Swift.RangeReplaceableCollection, C.Element == Combine.AnyCancellable
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
final public func store(in set: inout Swift.Set<Combine.AnyCancellable>)
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Cancellable {
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public func store<C>(in collection: inout C) where C : Swift.RangeReplaceableCollection, C.Element == Combine.AnyCancellable
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public func store(in set: inout Swift.Set<Combine.AnyCancellable>)
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func subscribe<S>(on scheduler: S, options: S.SchedulerOptions? = nil) -> Combine.Publishers.SubscribeOn<Self, S> where S : Combine.Scheduler
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct SubscribeOn<Upstream, Context> : Combine.Publisher where Upstream : Combine.Publisher, Context : Combine.Scheduler {
public typealias Output = Upstream.Output
public typealias Failure = Upstream.Failure
public let upstream: Upstream
public let scheduler: Context
public let options: Context.SchedulerOptions?
public init(upstream: Upstream, scheduler: Context, options: Context.SchedulerOptions?)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, Upstream.Output == S.Input
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func measureInterval<S>(using scheduler: S, options: S.SchedulerOptions? = nil) -> Combine.Publishers.MeasureInterval<Self, S> where S : Combine.Scheduler
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct MeasureInterval<Upstream, Context> : Combine.Publisher where Upstream : Combine.Publisher, Context : Combine.Scheduler {
public typealias Output = Context.SchedulerTimeType.Stride
public typealias Failure = Upstream.Failure
public let upstream: Upstream
public let scheduler: Context
public init(upstream: Upstream, scheduler: Context)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, S.Input == Context.SchedulerTimeType.Stride
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func drop(while predicate: @escaping (Self.Output) -> Swift.Bool) -> Combine.Publishers.DropWhile<Self>
public func tryDrop(while predicate: @escaping (Self.Output) throws -> Swift.Bool) -> Combine.Publishers.TryDropWhile<Self>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct DropWhile<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = Upstream.Output
public typealias Failure = Upstream.Failure
public let upstream: Upstream
public let predicate: (Combine.Publishers.DropWhile<Upstream>.Output) -> Swift.Bool
public init(upstream: Upstream, predicate: @escaping (Combine.Publishers.DropWhile<Upstream>.Output) -> Swift.Bool)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, Upstream.Output == S.Input
}
public struct TryDropWhile<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = Upstream.Output
public typealias Failure = Swift.Error
public let upstream: Upstream
public let predicate: (Combine.Publishers.TryDropWhile<Upstream>.Output) throws -> Swift.Bool
public init(upstream: Upstream, predicate: @escaping (Combine.Publishers.TryDropWhile<Upstream>.Output) throws -> Swift.Bool)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Output == S.Input, S.Failure == Swift.Error
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public struct Record<Output, Failure> : Combine.Publisher where Failure : Swift.Error {
public let recording: Combine.Record<Output, Failure>.Recording
public init(record: (inout Combine.Record<Output, Failure>.Recording) -> Swift.Void)
public init(recording: Combine.Record<Output, Failure>.Recording)
public init(output: [Output], completion: Combine.Subscribers.Completion<Failure>)
public func receive<S>(subscriber: S) where Output == S.Input, Failure == S.Failure, S : Combine.Subscriber
public struct Recording {
public typealias Input = Output
public var output: [Output] {
get
}
public var completion: Combine.Subscribers.Completion<Failure> {
get
}
public init()
public init(output: [Output], completion: Combine.Subscribers.Completion<Failure> = .finished)
public mutating func receive(_ input: Combine.Record<Output, Failure>.Recording.Input)
public mutating func receive(completion: Combine.Subscribers.Completion<Failure>)
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Record.Recording : Swift.Codable where Output : Swift.Decodable, Output : Swift.Encodable, Failure : Swift.Decodable, Failure : Swift.Encodable {
public init(from decoder: Swift.Decoder) throws
public func encode(into encoder: Swift.Encoder) throws
public func encode(to encoder: Swift.Encoder) throws
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Record : Swift.Codable where Output : Swift.Decodable, Output : Swift.Encodable, Failure : Swift.Decodable, Failure : Swift.Encodable {
public func encode(to encoder: Swift.Encoder) throws
public init(from decoder: Swift.Decoder) throws
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func filter(_ isIncluded: @escaping (Self.Output) -> Swift.Bool) -> Combine.Publishers.Filter<Self>
public func tryFilter(_ isIncluded: @escaping (Self.Output) throws -> Swift.Bool) -> Combine.Publishers.TryFilter<Self>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct Filter<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = Upstream.Output
public typealias Failure = Upstream.Failure
public let upstream: Upstream
public let isIncluded: (Upstream.Output) -> Swift.Bool
public init(upstream: Upstream, isIncluded: @escaping (Upstream.Output) -> Swift.Bool)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, Upstream.Output == S.Input
}
public struct TryFilter<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = Upstream.Output
public typealias Failure = Swift.Error
public let upstream: Upstream
public let isIncluded: (Upstream.Output) throws -> Swift.Bool
public init(upstream: Upstream, isIncluded: @escaping (Upstream.Output) throws -> Swift.Bool)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Output == S.Input, S.Failure == Swift.Error
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers.Filter {
public func filter(_ isIncluded: @escaping (Combine.Publishers.Filter<Upstream>.Output) -> Swift.Bool) -> Combine.Publishers.Filter<Upstream>
public func tryFilter(_ isIncluded: @escaping (Combine.Publishers.Filter<Upstream>.Output) throws -> Swift.Bool) -> Combine.Publishers.TryFilter<Upstream>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers.TryFilter {
public func filter(_ isIncluded: @escaping (Combine.Publishers.TryFilter<Upstream>.Output) -> Swift.Bool) -> Combine.Publishers.TryFilter<Upstream>
public func tryFilter(_ isIncluded: @escaping (Combine.Publishers.TryFilter<Upstream>.Output) throws -> Swift.Bool) -> Combine.Publishers.TryFilter<Upstream>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func breakpoint(receiveSubscription: ((Combine.Subscription) -> Swift.Bool)? = nil, receiveOutput: ((Self.Output) -> Swift.Bool)? = nil, receiveCompletion: ((Combine.Subscribers.Completion<Self.Failure>) -> Swift.Bool)? = nil) -> Combine.Publishers.Breakpoint<Self>
public func breakpointOnError() -> Combine.Publishers.Breakpoint<Self>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct Breakpoint<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = Upstream.Output
public typealias Failure = Upstream.Failure
public let upstream: Upstream
public let receiveSubscription: ((Combine.Subscription) -> Swift.Bool)?
public let receiveOutput: ((Upstream.Output) -> Swift.Bool)?
public let receiveCompletion: ((Combine.Subscribers.Completion<Combine.Publishers.Breakpoint<Upstream>.Failure>) -> Swift.Bool)?
public init(upstream: Upstream, receiveSubscription: ((Combine.Subscription) -> Swift.Bool)? = nil, receiveOutput: ((Upstream.Output) -> Swift.Bool)? = nil, receiveCompletion: ((Combine.Subscribers.Completion<Combine.Publishers.Breakpoint<Upstream>.Failure>) -> Swift.Bool)? = nil)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, Upstream.Output == S.Input
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public struct Deferred<DeferredPublisher> : Combine.Publisher where DeferredPublisher : Combine.Publisher {
public typealias Output = DeferredPublisher.Output
public typealias Failure = DeferredPublisher.Failure
public let createPublisher: () -> DeferredPublisher
public init(createPublisher: @escaping () -> DeferredPublisher)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, DeferredPublisher.Failure == S.Failure, DeferredPublisher.Output == S.Input
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func allSatisfy(_ predicate: @escaping (Self.Output) -> Swift.Bool) -> Combine.Publishers.AllSatisfy<Self>
public func tryAllSatisfy(_ predicate: @escaping (Self.Output) throws -> Swift.Bool) -> Combine.Publishers.TryAllSatisfy<Self>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct AllSatisfy<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = Swift.Bool
public typealias Failure = Upstream.Failure
public let upstream: Upstream
public let predicate: (Upstream.Output) -> Swift.Bool
public init(upstream: Upstream, predicate: @escaping (Upstream.Output) -> Swift.Bool)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, S.Input == Swift.Bool
}
public struct TryAllSatisfy<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = Swift.Bool
public typealias Failure = Swift.Error
public let upstream: Upstream
public let predicate: (Upstream.Output) throws -> Swift.Bool
public init(upstream: Upstream, predicate: @escaping (Upstream.Output) throws -> Swift.Bool)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, S.Failure == Swift.Error, S.Input == Swift.Bool
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func sink(receiveCompletion: @escaping ((Combine.Subscribers.Completion<Self.Failure>) -> Swift.Void), receiveValue: @escaping ((Self.Output) -> Swift.Void)) -> Combine.AnyCancellable
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher where Self.Failure == Swift.Never {
public func sink(receiveValue: @escaping ((Self.Output) -> Swift.Void)) -> Combine.AnyCancellable
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Subscribers {
final public class Sink<Input, Failure> : Combine.Subscriber, Combine.Cancellable, Swift.CustomStringConvertible, Swift.CustomReflectable, Swift.CustomPlaygroundDisplayConvertible where Failure : Swift.Error {
final public var receiveValue: (Input) -> Swift.Void {
get
}
final public var receiveCompletion: (Combine.Subscribers.Completion<Failure>) -> Swift.Void {
get
}
final public var description: Swift.String {
get
}
final public var customMirror: Swift.Mirror {
get
}
final public var playgroundDescription: Any {
get
}
public init(receiveCompletion: @escaping ((Combine.Subscribers.Completion<Failure>) -> Swift.Void), receiveValue: @escaping ((Input) -> Swift.Void))
@objc deinit
final public func receive(subscription: Combine.Subscription)
final public func receive(_ value: Input) -> Combine.Subscribers.Demand
final public func receive(completion: Combine.Subscribers.Completion<Failure>)
final public func cancel()
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
@usableFromInline
@_fixed_layout internal class AnySubscriberBase<Input, Failure> : Combine.Subscriber where Failure : Swift.Error {
@inline(__always) @inlinable internal init() {}
@objc @inline(__always) @inlinable deinit {}
@usableFromInline
internal func receive(subscription: Combine.Subscription)
@usableFromInline
internal func receive(_ input: Input) -> Combine.Subscribers.Demand
@usableFromInline
internal func receive(completion: Combine.Subscribers.Completion<Failure>)
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
@usableFromInline
@_fixed_layout final internal class AnySubscriberBox<Base> : Combine.AnySubscriberBase<Base.Input, Base.Failure> where Base : Combine.Subscriber {
@usableFromInline
final internal let base: Base
@inlinable internal init(_ base: Base) {
self.base = base
}
@objc @inlinable deinit {}
@inlinable override final internal func receive(subscription: Combine.Subscription) {
base.receive(subscription: subscription)
}
@inlinable override final internal func receive(_ input: Combine.AnySubscriberBox<Base>.Input) -> Combine.Subscribers.Demand {
base.receive(input)
}
@inlinable override final internal func receive(completion: Combine.Subscribers.Completion<Combine.AnySubscriberBox<Base>.Failure>) {
base.receive(completion: completion)
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
@usableFromInline
@_fixed_layout final internal class ClosureBasedAnySubscriber<Input, Failure> : Combine.AnySubscriberBase<Input, Failure> where Failure : Swift.Error {
@usableFromInline
final internal let receiveSubscriptionThunk: (Combine.Subscription) -> Swift.Void
@usableFromInline
final internal let receiveValueThunk: (Input) -> Combine.Subscribers.Demand
@usableFromInline
final internal let receiveCompletionThunk: (Combine.Subscribers.Completion<Failure>) -> Swift.Void
@inlinable internal init(_ rcvSubscription: @escaping (Combine.Subscription) -> Swift.Void, _ rcvValue: @escaping (Input) -> Combine.Subscribers.Demand, _ rcvCompletion: @escaping (Combine.Subscribers.Completion<Failure>) -> Swift.Void) {
receiveSubscriptionThunk = rcvSubscription
receiveValueThunk = rcvValue
receiveCompletionThunk = rcvCompletion
}
@objc @inlinable deinit {}
@inlinable override final internal func receive(subscription: Combine.Subscription) {
receiveSubscriptionThunk(subscription)
}
@inlinable override final internal func receive(_ input: Input) -> Combine.Subscribers.Demand {
receiveValueThunk(input)
}
@inlinable override final internal func receive(completion: Combine.Subscribers.Completion<Failure>) {
receiveCompletionThunk(completion)
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
@frozen public struct AnySubscriber<Input, Failure> : Combine.Subscriber, Swift.CustomStringConvertible, Swift.CustomReflectable, Swift.CustomPlaygroundDisplayConvertible where Failure : Swift.Error {
@usableFromInline
internal let box: Combine.AnySubscriberBase<Input, Failure>
@usableFromInline
internal let descriptionThunk: () -> Swift.String
@usableFromInline
internal let customMirrorThunk: () -> Swift.Mirror
@usableFromInline
internal let playgroundDescriptionThunk: () -> Any
public let combineIdentifier: Combine.CombineIdentifier
public var description: Swift.String {
get
}
public var customMirror: Swift.Mirror {
get
}
public var playgroundDescription: Any {
get
}
@inline(__always) @inlinable public init<S>(_ s: S) where Input == S.Input, Failure == S.Failure, S : Combine.Subscriber {
if let erased = s as? AnySubscriber<Input, Failure> {
self = erased
} else {
combineIdentifier = s.combineIdentifier
box = AnySubscriberBox(s)
// The following use normal memory management semantics
if let desc = s as? CustomStringConvertible {
descriptionThunk = {
return desc.description
}
} else {
let fixedDescription = "\(type(of: s))"
descriptionThunk = { fixedDescription }
}
customMirrorThunk = {
if let mir = s as? CustomReflectable {
return mir.customMirror
} else {
return Mirror(s, children: [:])
}
}
if let play = s as? CustomPlaygroundDisplayConvertible {
playgroundDescriptionThunk = { play.playgroundDescription }
} else if let desc = s as? CustomStringConvertible {
playgroundDescriptionThunk = { desc.description }
} else {
let fixedDescription = "\(type(of: s))"
playgroundDescriptionThunk = { fixedDescription }
}
}
}
public init<S>(_ s: S) where Input == S.Output, Failure == S.Failure, S : Combine.Subject
@inline(__always) @inlinable public init(receiveSubscription: ((Combine.Subscription) -> Swift.Void)? = nil, receiveValue: ((Input) -> Combine.Subscribers.Demand)? = nil, receiveCompletion: ((Combine.Subscribers.Completion<Failure>) -> Swift.Void)? = nil) {
box = ClosureBasedAnySubscriber(
receiveSubscription ?? { _ in },
receiveValue ?? { _ in return .none },
receiveCompletion ?? { _ in }
)
// The following use normal memory management semantics
combineIdentifier = CombineIdentifier()
descriptionThunk = {
return "Anonymous AnySubscriber"
}
customMirrorThunk = {
return Mirror(reflecting: "Anonymous AnySubscriber")
}
playgroundDescriptionThunk = {
return "Anonymous AnySubscriber"
}
}
@inline(__always) @inlinable public func receive(subscription: Combine.Subscription) {
box.receive(subscription: subscription)
}
@inline(__always) @inlinable public func receive(_ value: Input) -> Combine.Subscribers.Demand {
box.receive(value)
}
@inline(__always) @inlinable public func receive(completion: Combine.Subscribers.Completion<Failure>) {
box.receive(completion: completion)
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher where Self.Output : Swift.Equatable {
public func removeDuplicates() -> Combine.Publishers.RemoveDuplicates<Self>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func removeDuplicates(by predicate: @escaping (Self.Output, Self.Output) -> Swift.Bool) -> Combine.Publishers.RemoveDuplicates<Self>
public func tryRemoveDuplicates(by predicate: @escaping (Self.Output, Self.Output) throws -> Swift.Bool) -> Combine.Publishers.TryRemoveDuplicates<Self>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct RemoveDuplicates<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = Upstream.Output
public typealias Failure = Upstream.Failure
public let upstream: Upstream
public let predicate: (Combine.Publishers.RemoveDuplicates<Upstream>.Output, Combine.Publishers.RemoveDuplicates<Upstream>.Output) -> Swift.Bool
public init(upstream: Upstream, predicate: @escaping (Combine.Publishers.RemoveDuplicates<Upstream>.Output, Combine.Publishers.RemoveDuplicates<Upstream>.Output) -> Swift.Bool)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, Upstream.Output == S.Input
}
public struct TryRemoveDuplicates<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = Upstream.Output
public typealias Failure = Swift.Error
public let upstream: Upstream
public let predicate: (Combine.Publishers.TryRemoveDuplicates<Upstream>.Output, Combine.Publishers.TryRemoveDuplicates<Upstream>.Output) throws -> Swift.Bool
public init(upstream: Upstream, predicate: @escaping (Combine.Publishers.TryRemoveDuplicates<Upstream>.Output, Combine.Publishers.TryRemoveDuplicates<Upstream>.Output) throws -> Swift.Bool)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Output == S.Input, S.Failure == Swift.Error
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public protocol TopLevelDecoder {
associatedtype Input
func decode<T>(_ type: T.Type, from: Self.Input) throws -> T where T : Swift.Decodable
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public protocol TopLevelEncoder {
associatedtype Output
func encode<T>(_ value: T) throws -> Self.Output where T : Swift.Encodable
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct Decode<Upstream, Output, Coder> : Combine.Publisher where Upstream : Combine.Publisher, Output : Swift.Decodable, Coder : Combine.TopLevelDecoder, Upstream.Output == Coder.Input {
public typealias Failure = Swift.Error
public let upstream: Upstream
public init(upstream: Upstream, decoder: Coder)
public func receive<S>(subscriber: S) where Output == S.Input, S : Combine.Subscriber, S.Failure == Swift.Error
}
public struct Encode<Upstream, Coder> : Combine.Publisher where Upstream : Combine.Publisher, Coder : Combine.TopLevelEncoder, Upstream.Output : Swift.Encodable {
public typealias Failure = Swift.Error
public typealias Output = Coder.Output
public let upstream: Upstream
public init(upstream: Upstream, encoder: Coder)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Coder.Output == S.Input, S.Failure == Swift.Error
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func decode<Item, Coder>(type: Item.Type, decoder: Coder) -> Combine.Publishers.Decode<Self, Item, Coder> where Item : Swift.Decodable, Coder : Combine.TopLevelDecoder, Self.Output == Coder.Input
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher where Self.Output : Swift.Encodable {
public func encode<Coder>(encoder: Coder) -> Combine.Publishers.Encode<Self, Coder> where Coder : Combine.TopLevelEncoder
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public struct Just<Output> : Combine.Publisher {
public typealias Failure = Swift.Never
public let output: Output
public init(_ output: Output)
public func receive<S>(subscriber: S) where Output == S.Input, S : Combine.Subscriber, S.Failure == Swift.Never
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Just : Swift.Equatable where Output : Swift.Equatable {
public static func == (lhs: Combine.Just<Output>, rhs: Combine.Just<Output>) -> Swift.Bool
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Just where Output : Swift.Comparable {
public func min() -> Combine.Just<Output>
public func max() -> Combine.Just<Output>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Just where Output : Swift.Equatable {
public func contains(_ output: Output) -> Combine.Just<Swift.Bool>
public func removeDuplicates() -> Combine.Just<Output>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Just {
public func allSatisfy(_ predicate: (Output) -> Swift.Bool) -> Combine.Just<Swift.Bool>
public func tryAllSatisfy(_ predicate: (Output) throws -> Swift.Bool) -> Swift.Result<Swift.Bool, Swift.Error>.Publisher
public func collect() -> Combine.Just<[Output]>
public func compactMap<T>(_ transform: (Output) -> T?) -> Swift.Optional<T>.Publisher
public func min(by areInIncreasingOrder: (Output, Output) -> Swift.Bool) -> Combine.Just<Output>
public func max(by areInIncreasingOrder: (Output, Output) -> Swift.Bool) -> Combine.Just<Output>
public func prepend(_ elements: Output...) -> Combine.Publishers.Sequence<[Output], Combine.Just<Output>.Failure>
public func prepend<S>(_ elements: S) -> Combine.Publishers.Sequence<[Output], Combine.Just<Output>.Failure> where Output == S.Element, S : Swift.Sequence
public func append(_ elements: Output...) -> Combine.Publishers.Sequence<[Output], Combine.Just<Output>.Failure>
public func append<S>(_ elements: S) -> Combine.Publishers.Sequence<[Output], Combine.Just<Output>.Failure> where Output == S.Element, S : Swift.Sequence
public func contains(where predicate: (Output) -> Swift.Bool) -> Combine.Just<Swift.Bool>
public func tryContains(where predicate: (Output) throws -> Swift.Bool) -> Swift.Result<Swift.Bool, Swift.Error>.Publisher
public func count() -> Combine.Just<Swift.Int>
public func dropFirst(_ count: Swift.Int = 1) -> Swift.Optional<Output>.Publisher
public func drop(while predicate: (Output) -> Swift.Bool) -> Swift.Optional<Output>.Publisher
public func first() -> Combine.Just<Output>
public func first(where predicate: (Output) -> Swift.Bool) -> Swift.Optional<Output>.Publisher
public func last() -> Combine.Just<Output>
public func last(where predicate: (Output) -> Swift.Bool) -> Swift.Optional<Output>.Publisher
public func filter(_ isIncluded: (Output) -> Swift.Bool) -> Swift.Optional<Output>.Publisher
public func ignoreOutput() -> Combine.Empty<Output, Combine.Just<Output>.Failure>
public func map<T>(_ transform: (Output) -> T) -> Combine.Just<T>
public func tryMap<T>(_ transform: (Output) throws -> T) -> Swift.Result<T, Swift.Error>.Publisher
public func mapError<E>(_ transform: (Combine.Just<Output>.Failure) -> E) -> Swift.Result<Output, E>.Publisher where E : Swift.Error
public func output(at index: Swift.Int) -> Swift.Optional<Output>.Publisher
public func output<R>(in range: R) -> Swift.Optional<Output>.Publisher where R : Swift.RangeExpression, R.Bound == Swift.Int
public func prefix(_ maxLength: Swift.Int) -> Swift.Optional<Output>.Publisher
public func prefix(while predicate: (Output) -> Swift.Bool) -> Swift.Optional<Output>.Publisher
public func reduce<T>(_ initialResult: T, _ nextPartialResult: (T, Output) -> T) -> Swift.Result<T, Combine.Just<Output>.Failure>.Publisher
public func tryReduce<T>(_ initialResult: T, _ nextPartialResult: (T, Output) throws -> T) -> Swift.Result<T, Swift.Error>.Publisher
public func removeDuplicates(by predicate: (Output, Output) -> Swift.Bool) -> Combine.Just<Output>
public func tryRemoveDuplicates(by predicate: (Output, Output) throws -> Swift.Bool) -> Swift.Result<Output, Swift.Error>.Publisher
public func replaceError(with output: Output) -> Combine.Just<Output>
public func replaceEmpty(with output: Output) -> Combine.Just<Output>
public func retry(_ times: Swift.Int) -> Combine.Just<Output>
public func scan<T>(_ initialResult: T, _ nextPartialResult: (T, Output) -> T) -> Swift.Result<T, Combine.Just<Output>.Failure>.Publisher
public func tryScan<T>(_ initialResult: T, _ nextPartialResult: (T, Output) throws -> T) -> Swift.Result<T, Swift.Error>.Publisher
public func setFailureType<E>(to failureType: E.Type) -> Swift.Result<Output, E>.Publisher where E : Swift.Error
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
final public class PassthroughSubject<Output, Failure> : Combine.Subject where Failure : Swift.Error {
public init()
@objc deinit
final public func send(subscription: Combine.Subscription)
final public func receive<S>(subscriber: __owned S) where Output == S.Input, Failure == S.Failure, S : Combine.Subscriber
final public func send(_ input: Output)
final public func send(completion: Combine.Subscribers.Completion<Failure>)
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher where Self.Output : Swift.Equatable {
public func contains(_ output: Self.Output) -> Combine.Publishers.Contains<Self>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct Contains<Upstream> : Combine.Publisher where Upstream : Combine.Publisher, Upstream.Output : Swift.Equatable {
public typealias Output = Swift.Bool
public typealias Failure = Upstream.Failure
public let upstream: Upstream
public let output: Upstream.Output
public init(upstream: Upstream, output: Upstream.Output)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, S.Input == Swift.Bool
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers.Contains : Swift.Equatable where Upstream : Swift.Equatable {
public static func == (lhs: Combine.Publishers.Contains<Upstream>, rhs: Combine.Publishers.Contains<Upstream>) -> Swift.Bool
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func combineLatest<P>(_ other: P) -> Combine.Publishers.CombineLatest<Self, P> where P : Combine.Publisher, Self.Failure == P.Failure
public func combineLatest<P, T>(_ other: P, _ transform: @escaping (Self.Output, P.Output) -> T) -> Combine.Publishers.Map<Combine.Publishers.CombineLatest<Self, P>, T> where P : Combine.Publisher, Self.Failure == P.Failure
public func combineLatest<P, Q>(_ publisher1: P, _ publisher2: Q) -> Combine.Publishers.CombineLatest3<Self, P, Q> where P : Combine.Publisher, Q : Combine.Publisher, Self.Failure == P.Failure, P.Failure == Q.Failure
public func combineLatest<P, Q, T>(_ publisher1: P, _ publisher2: Q, _ transform: @escaping (Self.Output, P.Output, Q.Output) -> T) -> Combine.Publishers.Map<Combine.Publishers.CombineLatest3<Self, P, Q>, T> where P : Combine.Publisher, Q : Combine.Publisher, Self.Failure == P.Failure, P.Failure == Q.Failure
public func combineLatest<P, Q, R>(_ publisher1: P, _ publisher2: Q, _ publisher3: R) -> Combine.Publishers.CombineLatest4<Self, P, Q, R> where P : Combine.Publisher, Q : Combine.Publisher, R : Combine.Publisher, Self.Failure == P.Failure, P.Failure == Q.Failure, Q.Failure == R.Failure
public func combineLatest<P, Q, R, T>(_ publisher1: P, _ publisher2: Q, _ publisher3: R, _ transform: @escaping (Self.Output, P.Output, Q.Output, R.Output) -> T) -> Combine.Publishers.Map<Combine.Publishers.CombineLatest4<Self, P, Q, R>, T> where P : Combine.Publisher, Q : Combine.Publisher, R : Combine.Publisher, Self.Failure == P.Failure, P.Failure == Q.Failure, Q.Failure == R.Failure
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct CombineLatest<A, B> : Combine.Publisher where A : Combine.Publisher, B : Combine.Publisher, A.Failure == B.Failure {
public typealias Output = (A.Output, B.Output)
public typealias Failure = A.Failure
public let a: A
public let b: B
public init(_ a: A, _ b: B)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, B.Failure == S.Failure, S.Input == (A.Output, B.Output)
}
public struct CombineLatest3<A, B, C> : Combine.Publisher where A : Combine.Publisher, B : Combine.Publisher, C : Combine.Publisher, A.Failure == B.Failure, B.Failure == C.Failure {
public typealias Output = (A.Output, B.Output, C.Output)
public typealias Failure = A.Failure
public let a: A
public let b: B
public let c: C
public init(_ a: A, _ b: B, _ c: C)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, C.Failure == S.Failure, S.Input == (A.Output, B.Output, C.Output)
}
public struct CombineLatest4<A, B, C, D> : Combine.Publisher where A : Combine.Publisher, B : Combine.Publisher, C : Combine.Publisher, D : Combine.Publisher, A.Failure == B.Failure, B.Failure == C.Failure, C.Failure == D.Failure {
public typealias Output = (A.Output, B.Output, C.Output, D.Output)
public typealias Failure = A.Failure
public let a: A
public let b: B
public let c: C
public let d: D
public init(_ a: A, _ b: B, _ c: C, _ d: D)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, D.Failure == S.Failure, S.Input == (A.Output, B.Output, C.Output, D.Output)
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers.CombineLatest : Swift.Equatable where A : Swift.Equatable, B : Swift.Equatable {
public static func == (lhs: Combine.Publishers.CombineLatest<A, B>, rhs: Combine.Publishers.CombineLatest<A, B>) -> Swift.Bool
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers.CombineLatest3 : Swift.Equatable where A : Swift.Equatable, B : Swift.Equatable, C : Swift.Equatable {
public static func == (lhs: Combine.Publishers.CombineLatest3<A, B, C>, rhs: Combine.Publishers.CombineLatest3<A, B, C>) -> Swift.Bool
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers.CombineLatest4 : Swift.Equatable where A : Swift.Equatable, B : Swift.Equatable, C : Swift.Equatable, D : Swift.Equatable {
public static func == (lhs: Combine.Publishers.CombineLatest4<A, B, C, D>, rhs: Combine.Publishers.CombineLatest4<A, B, C, D>) -> Swift.Bool
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func prefix(_ maxLength: Swift.Int) -> Combine.Publishers.Output<Self>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.ConnectablePublisher {
public func autoconnect() -> Combine.Publishers.Autoconnect<Self>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public class Autoconnect<Upstream> : Combine.Publisher where Upstream : Combine.ConnectablePublisher {
public typealias Output = Upstream.Output
public typealias Failure = Upstream.Failure
final public let upstream: Upstream
public init(upstream: Upstream)
@objc deinit
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, Upstream.Output == S.Input
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func print(_ prefix: Swift.String = "", to stream: Swift.TextOutputStream? = nil) -> Combine.Publishers.Print<Self>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct Print<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = Upstream.Output
public typealias Failure = Upstream.Failure
public let prefix: Swift.String
public let upstream: Upstream
public let stream: Swift.TextOutputStream?
public init(upstream: Upstream, prefix: Swift.String, to stream: Swift.TextOutputStream? = nil)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, Upstream.Output == S.Input
}
}
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
public protocol ObservableObject : AnyObject {
associatedtype ObjectWillChangePublisher : Combine.Publisher = Combine.ObservableObjectPublisher where Self.ObjectWillChangePublisher.Failure == Swift.Never
var objectWillChange: Self.ObjectWillChangePublisher { get }
}
@_hasMissingDesignatedInitializers @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
final public class ObservableObjectPublisher : Combine.Publisher {
public typealias Output = Swift.Void
public typealias Failure = Swift.Never
public init()
@objc deinit
final public func receive<S>(subscriber: S) where S : Combine.Subscriber, S.Failure == Swift.Never, S.Input == ()
final public func send()
}
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
extension Combine.ObservableObject where Self.ObjectWillChangePublisher == Combine.ObservableObjectPublisher {
public var objectWillChange: Combine.ObservableObjectPublisher {
get
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func prefix(while predicate: @escaping (Self.Output) -> Swift.Bool) -> Combine.Publishers.PrefixWhile<Self>
public func tryPrefix(while predicate: @escaping (Self.Output) throws -> Swift.Bool) -> Combine.Publishers.TryPrefixWhile<Self>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct PrefixWhile<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = Upstream.Output
public typealias Failure = Upstream.Failure
public let upstream: Upstream
public let predicate: (Combine.Publishers.PrefixWhile<Upstream>.Output) -> Swift.Bool
public init(upstream: Upstream, predicate: @escaping (Combine.Publishers.PrefixWhile<Upstream>.Output) -> Swift.Bool)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, Upstream.Output == S.Input
}
public struct TryPrefixWhile<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = Upstream.Output
public typealias Failure = Swift.Error
public let upstream: Upstream
public let predicate: (Combine.Publishers.TryPrefixWhile<Upstream>.Output) throws -> Swift.Bool
public init(upstream: Upstream, predicate: @escaping (Combine.Publishers.TryPrefixWhile<Upstream>.Output) throws -> Swift.Bool)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Output == S.Input, S.Failure == Swift.Error
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
final public class Future<Output, Failure> : Combine.Publisher where Failure : Swift.Error {
public typealias Promise = (Swift.Result<Output, Failure>) -> Swift.Void
public init(_ attemptToFulfill: @escaping (@escaping Combine.Future<Output, Failure>.Promise) -> Swift.Void)
@objc deinit
final public func receive<S>(subscriber: S) where Output == S.Input, Failure == S.Failure, S : Combine.Subscriber
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public struct Empty<Output, Failure> : Combine.Publisher, Swift.Equatable where Failure : Swift.Error {
public init(completeImmediately: Swift.Bool = true)
public init(completeImmediately: Swift.Bool = true, outputType: Output.Type, failureType: Failure.Type)
public let completeImmediately: Swift.Bool
public func receive<S>(subscriber: S) where Output == S.Input, Failure == S.Failure, S : Combine.Subscriber
public static func == (lhs: Combine.Empty<Output, Failure>, rhs: Combine.Empty<Output, Failure>) -> Swift.Bool
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher where Self.Failure == Swift.Never {
public func setFailureType<E>(to failureType: E.Type) -> Combine.Publishers.SetFailureType<Self, E> where E : Swift.Error
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct SetFailureType<Upstream, Failure> : Combine.Publisher where Upstream : Combine.Publisher, Failure : Swift.Error, Upstream.Failure == Swift.Never {
public typealias Output = Upstream.Output
public let upstream: Upstream
public init(upstream: Upstream)
public func receive<S>(subscriber: S) where Failure == S.Failure, S : Combine.Subscriber, Upstream.Output == S.Input
public func setFailureType<E>(to failure: E.Type) -> Combine.Publishers.SetFailureType<Upstream, E> where E : Swift.Error
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers.SetFailureType : Swift.Equatable where Upstream : Swift.Equatable {
public static func == (lhs: Combine.Publishers.SetFailureType<Upstream, Failure>, rhs: Combine.Publishers.SetFailureType<Upstream, Failure>) -> Swift.Bool
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Swift.Optional {
@available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *)
public var publisher: Swift.Optional<Wrapped>.Publisher {
get
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public struct Publisher : Combine.Publisher {
public typealias Output = Wrapped
public typealias Failure = Swift.Never
public let output: Swift.Optional<Wrapped>.Publisher.Output?
public init(_ output: Swift.Optional<Wrapped>.Publisher.Output?)
public func receive<S>(subscriber: S) where Wrapped == S.Input, S : Combine.Subscriber, S.Failure == Swift.Never
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Swift.Optional.Publisher : Swift.Equatable where Wrapped : Swift.Equatable {
public static func == (lhs: Swift.Optional<Wrapped>.Publisher, rhs: Swift.Optional<Wrapped>.Publisher) -> Swift.Bool
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Swift.Optional.Publisher where Wrapped : Swift.Equatable {
public func contains(_ output: Swift.Optional<Wrapped>.Publisher.Output) -> Swift.Optional<Swift.Bool>.Publisher
public func removeDuplicates() -> Swift.Optional<Wrapped>.Publisher
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Swift.Optional.Publisher where Wrapped : Swift.Comparable {
public func min() -> Swift.Optional<Wrapped>.Publisher
public func max() -> Swift.Optional<Wrapped>.Publisher
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Swift.Optional.Publisher {
public func allSatisfy(_ predicate: (Swift.Optional<Wrapped>.Publisher.Output) -> Swift.Bool) -> Swift.Optional<Swift.Bool>.Publisher
public func collect() -> Swift.Optional<[Swift.Optional<Wrapped>.Publisher.Output]>.Publisher
public func compactMap<T>(_ transform: (Swift.Optional<Wrapped>.Publisher.Output) -> T?) -> Swift.Optional<T>.Publisher
public func min(by areInIncreasingOrder: (Swift.Optional<Wrapped>.Publisher.Output, Swift.Optional<Wrapped>.Publisher.Output) -> Swift.Bool) -> Swift.Optional<Wrapped>.Publisher
public func max(by areInIncreasingOrder: (Swift.Optional<Wrapped>.Publisher.Output, Swift.Optional<Wrapped>.Publisher.Output) -> Swift.Bool) -> Swift.Optional<Wrapped>.Publisher
public func contains(where predicate: (Swift.Optional<Wrapped>.Publisher.Output) -> Swift.Bool) -> Swift.Optional<Swift.Bool>.Publisher
public func count() -> Swift.Optional<Swift.Int>.Publisher
public func dropFirst(_ count: Swift.Int = 1) -> Swift.Optional<Wrapped>.Publisher
public func drop(while predicate: (Swift.Optional<Wrapped>.Publisher.Output) -> Swift.Bool) -> Swift.Optional<Wrapped>.Publisher
public func first() -> Swift.Optional<Wrapped>.Publisher
public func first(where predicate: (Swift.Optional<Wrapped>.Publisher.Output) -> Swift.Bool) -> Swift.Optional<Wrapped>.Publisher
public func last() -> Swift.Optional<Wrapped>.Publisher
public func last(where predicate: (Swift.Optional<Wrapped>.Publisher.Output) -> Swift.Bool) -> Swift.Optional<Wrapped>.Publisher
public func filter(_ isIncluded: (Swift.Optional<Wrapped>.Publisher.Output) -> Swift.Bool) -> Swift.Optional<Wrapped>.Publisher
public func ignoreOutput() -> Combine.Empty<Swift.Optional<Wrapped>.Publisher.Output, Swift.Optional<Wrapped>.Publisher.Failure>
public func map<T>(_ transform: (Swift.Optional<Wrapped>.Publisher.Output) -> T) -> Swift.Optional<T>.Publisher
public func output(at index: Swift.Int) -> Swift.Optional<Wrapped>.Publisher
public func output<R>(in range: R) -> Swift.Optional<Wrapped>.Publisher where R : Swift.RangeExpression, R.Bound == Swift.Int
public func prefix(_ maxLength: Swift.Int) -> Swift.Optional<Wrapped>.Publisher
public func prefix(while predicate: (Swift.Optional<Wrapped>.Publisher.Output) -> Swift.Bool) -> Swift.Optional<Wrapped>.Publisher
public func reduce<T>(_ initialResult: T, _ nextPartialResult: (T, Swift.Optional<Wrapped>.Publisher.Output) -> T) -> Swift.Optional<T>.Publisher
public func removeDuplicates(by predicate: (Swift.Optional<Wrapped>.Publisher.Output, Swift.Optional<Wrapped>.Publisher.Output) -> Swift.Bool) -> Swift.Optional<Wrapped>.Publisher
public func replaceError(with output: Swift.Optional<Wrapped>.Publisher.Output) -> Swift.Optional<Swift.Optional<Wrapped>.Publisher.Output>.Publisher
public func replaceEmpty(with output: Swift.Optional<Wrapped>.Publisher.Output) -> Combine.Just<Wrapped>
public func retry(_ times: Swift.Int) -> Swift.Optional<Wrapped>.Publisher
public func scan<T>(_ initialResult: T, _ nextPartialResult: (T, Swift.Optional<Wrapped>.Publisher.Output) -> T) -> Swift.Optional<T>.Publisher
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func contains(where predicate: @escaping (Self.Output) -> Swift.Bool) -> Combine.Publishers.ContainsWhere<Self>
public func tryContains(where predicate: @escaping (Self.Output) throws -> Swift.Bool) -> Combine.Publishers.TryContainsWhere<Self>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct ContainsWhere<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = Swift.Bool
public typealias Failure = Upstream.Failure
public let upstream: Upstream
public let predicate: (Upstream.Output) -> Swift.Bool
public init(upstream: Upstream, predicate: @escaping (Upstream.Output) -> Swift.Bool)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, S.Input == Swift.Bool
}
public struct TryContainsWhere<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = Swift.Bool
public typealias Failure = Swift.Error
public let upstream: Upstream
public let predicate: (Upstream.Output) throws -> Swift.Bool
public init(upstream: Upstream, predicate: @escaping (Upstream.Output) throws -> Swift.Bool)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, S.Failure == Swift.Error, S.Input == Swift.Bool
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public enum Publishers {
}
#if compiler(>=5.3) && $PrimaryAssociatedTypes2
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public protocol Publisher<Output, Failure> {
associatedtype Output
associatedtype Failure : Swift.Error
func receive<S>(subscriber: S) where S : Combine.Subscriber, Self.Failure == S.Failure, Self.Output == S.Input
}
#else
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public protocol Publisher {
associatedtype Output
associatedtype Failure : Swift.Error
func receive<S>(subscriber: S) where S : Combine.Subscriber, Self.Failure == S.Failure, Self.Output == S.Input
}
#endif
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
@inline(never) public func subscribe<S>(_ subscriber: S) where S : Combine.Subscriber, Self.Failure == S.Failure, Self.Output == S.Input
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher where Self.Failure == Swift.Never {
@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
public func assign(to published: inout Combine.Published<Self.Output>.Publisher)
}
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
@propertyWrapper public struct Published<Value> {
@_alwaysEmitIntoClient public init(wrappedValue: Value) {
self.init(initialValue: wrappedValue)
}
public init(initialValue: Value)
@available(*, unavailable, message: "@Published is only available on properties of classes")
public var wrappedValue: Value {
get
set
}
public static subscript<EnclosingSelf>(_enclosingInstance object: EnclosingSelf, wrapped wrappedKeyPath: Swift.ReferenceWritableKeyPath<EnclosingSelf, Value>, storage storageKeyPath: Swift.ReferenceWritableKeyPath<EnclosingSelf, Combine.Published<Value>>) -> Value where EnclosingSelf : AnyObject {
get
set
}
public struct Publisher : Combine.Publisher {
public typealias Output = Value
public typealias Failure = Swift.Never
public func receive<S>(subscriber: S) where Value == S.Input, S : Combine.Subscriber, S.Failure == Swift.Never
}
public var projectedValue: Combine.Published<Value>.Publisher {
mutating get
@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
_modify
}
}
#if compiler(>=5.3) && $PrimaryAssociatedTypes2
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public protocol ConnectablePublisher<Output, Failure> : Combine.Publisher {
func connect() -> Combine.Cancellable
}
#else
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public protocol ConnectablePublisher : Combine.Publisher {
func connect() -> Combine.Cancellable
}
#endif
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher where Self.Failure == Swift.Never {
public func makeConnectable() -> Combine.Publishers.MakeConnectable<Self>
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct MakeConnectable<Upstream> : Combine.ConnectablePublisher where Upstream : Combine.Publisher {
public typealias Output = Upstream.Output
public typealias Failure = Upstream.Failure
public init(upstream: Upstream)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, Upstream.Output == S.Input
public func connect() -> Combine.Cancellable
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func collect() -> Combine.Publishers.Collect<Self>
public func collect(_ count: Swift.Int) -> Combine.Publishers.CollectByCount<Self>
public func collect<S>(_ strategy: Combine.Publishers.TimeGroupingStrategy<S>, options: S.SchedulerOptions? = nil) -> Combine.Publishers.CollectByTime<Self, S> where S : Combine.Scheduler
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public enum TimeGroupingStrategy<Context> where Context : Combine.Scheduler {
case byTime(Context, Context.SchedulerTimeType.Stride)
case byTimeOrCount(Context, Context.SchedulerTimeType.Stride, Swift.Int)
}
public struct CollectByTime<Upstream, Context> : Combine.Publisher where Upstream : Combine.Publisher, Context : Combine.Scheduler {
public typealias Output = [Upstream.Output]
public typealias Failure = Upstream.Failure
public let upstream: Upstream
public let strategy: Combine.Publishers.TimeGroupingStrategy<Context>
public let options: Context.SchedulerOptions?
public init(upstream: Upstream, strategy: Combine.Publishers.TimeGroupingStrategy<Context>, options: Context.SchedulerOptions?)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, S.Input == [Upstream.Output]
}
public struct Collect<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = [Upstream.Output]
public typealias Failure = Upstream.Failure
public let upstream: Upstream
public init(upstream: Upstream)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, S.Input == [Upstream.Output]
}
public struct CollectByCount<Upstream> : Combine.Publisher where Upstream : Combine.Publisher {
public typealias Output = [Upstream.Output]
public typealias Failure = Upstream.Failure
public let upstream: Upstream
public let count: Swift.Int
public init(upstream: Upstream, count: Swift.Int)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, S.Input == [Upstream.Output]
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers.Collect : Swift.Equatable where Upstream : Swift.Equatable {
public static func == (lhs: Combine.Publishers.Collect<Upstream>, rhs: Combine.Publishers.Collect<Upstream>) -> Swift.Bool
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers.CollectByCount : Swift.Equatable where Upstream : Swift.Equatable {
public static func == (lhs: Combine.Publishers.CollectByCount<Upstream>, rhs: Combine.Publishers.CollectByCount<Upstream>) -> Swift.Bool
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publisher {
public func receive<S>(on scheduler: S, options: S.SchedulerOptions? = nil) -> Combine.Publishers.ReceiveOn<Self, S> where S : Combine.Scheduler
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Publishers {
public struct ReceiveOn<Upstream, Context> : Combine.Publisher where Upstream : Combine.Publisher, Context : Combine.Scheduler {
public typealias Output = Upstream.Output
public typealias Failure = Upstream.Failure
public let upstream: Upstream
public let scheduler: Context
public let options: Context.SchedulerOptions?
public init(upstream: Upstream, scheduler: Context, options: Context.SchedulerOptions?)
public func receive<S>(subscriber: S) where S : Combine.Subscriber, Upstream.Failure == S.Failure, Upstream.Output == S.Input
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public enum Subscribers {
}
#if compiler(>=5.3) && $PrimaryAssociatedTypes2
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public protocol Subscriber<Input, Failure> : Combine.CustomCombineIdentifierConvertible {
associatedtype Input
associatedtype Failure : Swift.Error
func receive(subscription: Combine.Subscription)
func receive(_ input: Self.Input) -> Combine.Subscribers.Demand
func receive(completion: Combine.Subscribers.Completion<Self.Failure>)
}
#else
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public protocol Subscriber : Combine.CustomCombineIdentifierConvertible {
associatedtype Input
associatedtype Failure : Swift.Error
func receive(subscription: Combine.Subscription)
func receive(_ input: Self.Input) -> Combine.Subscribers.Demand
func receive(completion: Combine.Subscribers.Completion<Self.Failure>)
}
#endif
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Subscribers {
@frozen public enum Completion<Failure> where Failure : Swift.Error {
case finished
case failure(Failure)
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Subscribers.Completion : Swift.Equatable where Failure : Swift.Equatable {
public static func == (a: Combine.Subscribers.Completion<Failure>, b: Combine.Subscribers.Completion<Failure>) -> Swift.Bool
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Subscribers.Completion : Swift.Hashable where Failure : Swift.Hashable {
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Subscribers.Completion : Swift.Encodable where Failure : Swift.Encodable {
public func encode(to encoder: Swift.Encoder) throws
}
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Combine.Subscribers.Completion : Swift.Decodable where Failure : Swift.Decodable {