| ... | ... | @@ -1306,11 +1306,14 @@ pub const Reader = struct { |
| 1306 | 1306 | |
| 1307 | 1307 | /// A `Io.Reader` that gets its data from another `Io.Reader`, and always |
| 1308 | 1308 | /// writes to its own buffer (and returns 0) during `stream` and `readVec`. |
| 1309 | /// Note: zero length buffers are not supported. |
| 1309 | 1310 | pub const ReaderIndirect = struct { |
| 1310 | 1311 | in: *Io.Reader, |
| 1311 | 1312 | interface: Io.Reader, |
| 1312 | 1313 | |
| 1313 | 1314 | pub fn init(in: *Io.Reader, buffer: []u8) ReaderIndirect { |
| 1315 | assert(buffer.len > 0); |
| 1316 | |
| 1314 | 1317 | return .{ |
| 1315 | 1318 | .in = in, |
| 1316 | 1319 | .interface = .{ |
| ... | ... | @@ -1366,11 +1369,14 @@ pub const ReaderIndirect = struct { |
| 1366 | 1369 | |
| 1367 | 1370 | /// A `Io.Writer` that writes its data to another `Io.Writer`, and only |
| 1368 | 1371 | /// writes new data to its own buffer during `drain`. |
| 1372 | /// Note: zero length buffers are not supported. |
| 1369 | 1373 | pub const WriterIndirect = struct { |
| 1370 | 1374 | out: *Io.Writer, |
| 1371 | 1375 | interface: Io.Writer, |
| 1372 | 1376 | |
| 1373 | 1377 | pub fn init(out: *Io.Writer, buffer: []u8) WriterIndirect { |
| 1378 | assert(buffer.len > 0); |
| 1379 | |
| 1374 | 1380 | return .{ |
| 1375 | 1381 | .out = out, |
| 1376 | 1382 | .interface = .{ |