@@ -136,7 +136,7 @@ internal struct BufferedStream<Element> {
136
136
@usableFromInline
137
137
let storage : _BackPressuredStorage
138
138
139
- @inlinable
139
+ @usableFromInline
140
140
init ( storage: _BackPressuredStorage ) {
141
141
self . storage = storage
142
142
}
@@ -171,7 +171,7 @@ extension BufferedStream: AsyncSequence {
171
171
@usableFromInline
172
172
let storage : _BackPressuredStorage
173
173
174
- @inlinable
174
+ @usableFromInline
175
175
init ( storage: _BackPressuredStorage ) {
176
176
self . storage = storage
177
177
self . storage. iteratorInitialized ( )
@@ -191,7 +191,7 @@ extension BufferedStream: AsyncSequence {
191
191
@usableFromInline
192
192
var implementation : _Implementation
193
193
194
- @inlinable
194
+ @usableFromInline
195
195
init ( implementation: _Implementation ) {
196
196
self . implementation = implementation
197
197
}
@@ -237,7 +237,7 @@ internal struct _ManagedCriticalState<State>: @unchecked Sendable {
237
237
@usableFromInline
238
238
let lock : LockedValueBox < State >
239
239
240
- @inlinable
240
+ @usableFromInline
241
241
internal init ( _ initial: State ) {
242
242
self . lock = . init( initial)
243
243
}
@@ -252,7 +252,7 @@ internal struct _ManagedCriticalState<State>: @unchecked Sendable {
252
252
253
253
@usableFromInline
254
254
internal struct AlreadyFinishedError : Error {
255
- @inlinable
255
+ @usableFromInline
256
256
init ( ) { }
257
257
}
258
258
@@ -289,7 +289,7 @@ extension BufferedStream {
289
289
)
290
290
}
291
291
292
- @inlinable
292
+ @usableFromInline
293
293
init ( internalBackPressureStrategy: _InternalBackPressureStrategy ) {
294
294
self . _internalBackPressureStrategy = internalBackPressureStrategy
295
295
}
@@ -329,7 +329,7 @@ extension BufferedStream {
329
329
@usableFromInline
330
330
let storage : _BackPressuredStorage
331
331
332
- @inlinable
332
+ @usableFromInline
333
333
init ( storage: _BackPressuredStorage ) {
334
334
self . storage = storage
335
335
}
@@ -359,7 +359,7 @@ extension BufferedStream {
359
359
@usableFromInline
360
360
var _backing : _Backing
361
361
362
- @inlinable
362
+ @usableFromInline
363
363
internal init ( storage: _BackPressuredStorage ) {
364
364
self . _backing = . init( storage: storage)
365
365
}
@@ -580,7 +580,7 @@ extension BufferedStream {
580
580
return ( . init( storage: storage) , source)
581
581
}
582
582
583
- @inlinable
583
+ @usableFromInline
584
584
init ( storage: _BackPressuredStorage ) {
585
585
self . implementation = . backpressured( . init( storage: storage) )
586
586
}
@@ -609,7 +609,7 @@ extension BufferedStream {
609
609
/// - low: The low watermark where demand should start.
610
610
/// - high: The high watermark where demand should be stopped.
611
611
/// - waterLevelForElement: Function to compute the contribution to the water level for a given element.
612
- @inlinable
612
+ @usableFromInline
613
613
init ( low: Int , high: Int , waterLevelForElement: ( @Sendable ( Element ) -> Int ) ? = nil ) {
614
614
precondition ( low <= high)
615
615
self . _low = low
@@ -618,7 +618,7 @@ extension BufferedStream {
618
618
self . _waterLevelForElement = waterLevelForElement
619
619
}
620
620
621
- @inlinable
621
+ @usableFromInline
622
622
mutating func didYield( elements: Deque < Element > . SubSequence ) -> Bool {
623
623
if let waterLevelForElement = self . _waterLevelForElement {
624
624
self . _current += elements. reduce ( 0 ) { $0 + waterLevelForElement( $1) }
@@ -630,7 +630,7 @@ extension BufferedStream {
630
630
return self . _current < self . _high
631
631
}
632
632
633
- @inlinable
633
+ @usableFromInline
634
634
mutating func didConsume( elements: Deque < Element > . SubSequence ) -> Bool {
635
635
if let waterLevelForElement = self . _waterLevelForElement {
636
636
self . _current -= elements. reduce ( 0 ) { $0 + waterLevelForElement( $1) }
@@ -642,7 +642,7 @@ extension BufferedStream {
642
642
return self . _current < self . _low
643
643
}
644
644
645
- @inlinable
645
+ @usableFromInline
646
646
mutating func didConsume( element: Element ) -> Bool {
647
647
if let waterLevelForElement = self . _waterLevelForElement {
648
648
self . _current -= waterLevelForElement ( element)
@@ -669,7 +669,7 @@ extension BufferedStream {
669
669
}
670
670
}
671
671
672
- @inlinable
672
+ @usableFromInline
673
673
mutating func didConsume( elements: Deque < Element > . SubSequence ) -> Bool {
674
674
switch self {
675
675
case . watermark( var strategy) :
@@ -679,7 +679,7 @@ extension BufferedStream {
679
679
}
680
680
}
681
681
682
- @inlinable
682
+ @usableFromInline
683
683
mutating func didConsume( element: Element ) -> Bool {
684
684
switch self {
685
685
case . watermark( var strategy) :
@@ -714,7 +714,7 @@ extension BufferedStream {
714
714
}
715
715
}
716
716
717
- @inlinable
717
+ @usableFromInline
718
718
init (
719
719
backPressureStrategy: _InternalBackPressureStrategy
720
720
) {
@@ -1026,7 +1026,7 @@ extension BufferedStream {
1026
1026
@usableFromInline
1027
1027
var onTermination : ( @Sendable ( ) -> Void ) ?
1028
1028
1029
- @inlinable
1029
+ @usableFromInline
1030
1030
init (
1031
1031
backPressureStrategy: _InternalBackPressureStrategy ,
1032
1032
iteratorInitialized: Bool ,
@@ -1065,7 +1065,7 @@ extension BufferedStream {
1065
1065
@usableFromInline
1066
1066
var hasOutstandingDemand : Bool
1067
1067
1068
- @inlinable
1068
+ @usableFromInline
1069
1069
init (
1070
1070
backPressureStrategy: _InternalBackPressureStrategy ,
1071
1071
iteratorInitialized: Bool ,
@@ -1102,7 +1102,7 @@ extension BufferedStream {
1102
1102
@usableFromInline
1103
1103
var onTermination : ( @Sendable ( ) -> Void ) ?
1104
1104
1105
- @inlinable
1105
+ @usableFromInline
1106
1106
init (
1107
1107
iteratorInitialized: Bool ,
1108
1108
buffer: Deque < Element > ,
@@ -1188,7 +1188,7 @@ extension BufferedStream {
1188
1188
/// it is a customizable extension of the state machine.
1189
1189
///
1190
1190
/// - Parameter backPressureStrategy: The back-pressure strategy.
1191
- @inlinable
1191
+ @usableFromInline
1192
1192
init (
1193
1193
backPressureStrategy: _InternalBackPressureStrategy
1194
1194
) {
0 commit comments