aboutsummaryrefslogtreecommitdiff
path: root/lib/std/io/fixed_buffer_stream.zig
AgeCommit message (Collapse)Author
2020-06-09Support Reader for InStreamJonathan Marler
2020-06-08support Writer instead of OutStreamJonathan Marler
Start implementing https://github.com/ziglang/zig/issues/4917 which is to rename instream/outstream to reader/writer. This first change allows code to use Writer/writer instead of OutStream/outStream, but still maintains the old outstream names with "Deprecated" comments.
2020-03-13fix all the TODOs from the pull requestAndrew Kelley
* `std.Buffer.print` is removed; use `buffer.outStream().print` * `std.fmt.count` returns a `u64` * `std.Fifo.print` is removed; use `fifo.outStream().print` * `std.fmt.bufPrint` error is renamed from `BufferTooSmall` to `NoSpaceLeft` to match `std.os.write`. * `std.io.FixedBufferStream.getWritten` returns mutable buffer if the buffer is mutable.
2020-03-11FixedBufferStream: match file semantics more by clamping posAndrew Kelley
2020-03-11add std.io.StreamSource and fixes to emitRawAndrew Kelley
2020-03-10fix regressions caused earlier in this branchAndrew Kelley
2020-03-10update standard library to new I/O streams APIAndrew Kelley
2020-03-10(breaking) improve and simplify fixed buffer streams APIAndrew Kelley
2020-03-10(breaking) rework stream abstractionsAndrew Kelley
The main goal here is to make the function pointers comptime, so that we don't have to do the crazy stuff with async function frames. Since InStream, OutStream, and SeekableStream are already generic across error sets, it's not really worse to make them generic across the vtable as well. See #764 for the open issue acknowledging that using generics for these abstractions is a design flaw. See #130 for the efforts to make these abstractions non-generic. This commit also changes the OutStream API so that `write` returns number of bytes written, and `writeAll` is the one that loops until the whole buffer is written.