Skip to content

You're viewing documentation for a pre-release version. View the latest stable version

Instance Method

forEachChunk(_:)

Reads the whole remaining body, calling body once per chunk in order, until it ends.
func forEachChunk(_ body: (Span<UInt8>) async throws -> Void) async throws

Discussion

The span handed to body is only valid for that call; copy out anything you need to keep.