Structureswift-nio 2.81.0_NIOFileSystem
FileChunkIterator
FileChunks.swift:68- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
struct FileChunkIterator
struct FileChunkIterator
import _NIOFileSystem
A file system library for Swift.
struct FileChunks
An AsyncSequence
of ordered chunks read from a file.
init<S>(wrapping sequence: S) where S : Sendable, S : AsyncSequence, S.Element == ByteBuffer
Create a FileChunks
sequence backed by wrapping an AsyncSequence
.
func makeAsyncIterator() -> FileChunkIterator
typealias Element = ByteBuffer
protocol AsyncIteratorProtocol<Element, Failure>
A type that asynchronously supplies the values of a sequence one at a time.
mutating func next() async throws -> ByteBuffer?
mutating func next(isolation actor: isolated (any Actor)?) async throws(Self.Failure) -> Self.Element?
Default implementation of next()
in terms of next()
, which is required to maintain backward compatibility with existing async iterators.