mirror of
https://github.com/apple/swift-nio-imap
synced 2026-11-25 04:47:51 +00:00
The four raw-payload cases become IMAPBuffer so a large literal can be handed in and out without a copy: FetchResponse.streamingBytes, AppendCommand.messageBytes, AppendCommand.CatenateData.bytes, CommandStreamPart.continuationResponse. Review focus: writeBytes(IMAPBuffer) keeps payloads by reference (ZeroCopyWriteTests); the parser's extractBuffer(upTo:) still copies. Updates IMAPTool and the IMAPCommands append/continuation wrappers. Public API breaks: - The four cases above: ByteBuffer -> IMAPBuffer. Removes the writeBuffer(inout ByteBuffer) shim from "Encode into an EncoderOutputBuffer sink".