The error to throw, or nil
, to finish normally.
Instance Method
インスタンスメソッド
finish(throwing:)
Resume the task awaiting the next iteration point by having it return nil, which signifies the end of the iteration.
Availability
- iOS 15.0+
- iPadOS 15.0+
- macOS 12.0+
- Mac Catalyst 15.0+
- tvOS 15.0+
- watchOS 8.0+
- Xcode 13.0+
Technology
- Swift Standard Library Swift標準ライブラリ
Declaration 宣言
func finish(throwing error: Failure? = nil)
Parameters パラメータ
error
Discussion 解説
Calling this function more than once has no effect. After calling finish, the stream enters a terminal state and doesn’t produce any additional elements.