Enumerationswift 6.0.1_Concurrency
Termination
A type that indicates how the stream terminated.
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
enum Termination
The onTermination
closure receives an instance of this type.
Cases
case cancelled
The stream finished as a result of cancellation.
case finished
The stream finished as a result of calling the continuation’s
finish
method.
Other members in extension
Types
enum BufferingPolicy
A strategy that handles exhaustion of a buffer’s capacity.
enum YieldResult
A type that indicates the result of yielding a value to a client, by way of the continuation.
Instance members
var onTermination: ((AsyncStream<Element>.Continuation.Termination) -> Void)?
A callback to invoke when canceling iteration of an asynchronous stream.
func finish(
) Resume the task awaiting the next iteration point by having it return nil, which signifies the end of the iteration.
func yield(
) -> AsyncStream<Element>.Continuation.YieldResult Resume the task awaiting the next iteration point by having it return normally from its suspension point.
func yield(sending
Element) -> AsyncStream<Element>.Continuation.YieldResult Resume the task awaiting the next iteration point by having it return normally from its suspension point with a given element.
func yield(with: sending
Result<Element, Never>) -> AsyncStream<Element>.Continuation.YieldResult Resume the task awaiting the next iteration point by having it return normally from its suspension point with a given result’s success value.
Citizens in _Concurrency
Conformances
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.