aboutsummaryrefslogtreecommitdiff
path: root/lib/std/io/fixed_buffer_stream.zig
AgeCommit message (Collapse)Author
2022-05-27math: make `cast` return optional instead of an errorAli Chraghi
2022-03-08deprecated TypeInfo in favor of TypeJonathan Marler
Co-authored-by: Veikka Tuominen <git@vexu.eu>
2021-08-24remove redundant license headers from zig standard libraryAndrew Kelley
We already have a LICENSE file that covers the Zig Standard Library. We no longer need to remind everyone that the license is MIT in every single file. Previously this was introduced to clarify the situation for a fork of Zig that made Zig's LICENSE file harder to find, and replaced it with their own license that required annual payments to their company. However that fork now appears to be dead. So there is no need to reinforce the copyright notice in every single file.
2021-06-08Limit Fixed Buffer Stream seekTo (#9023)Dustin Taylor
2021-05-08std: update usage of std.testingVeikka Tuominen
2021-01-08Remove deprecated stream aliasesJay Petacat
2021-01-07Reduce use of deprecated IO typesJay Petacat
Related: #4917
2021-01-02std: Use {s} instead of {} when printing stringsLemonBoy
2020-12-31Year++Frank Denis
2020-08-20add license header to all std lib filesAndrew Kelley
add SPDX license identifier copyright ownership is zig contributors
2020-07-11run zig fmt on std lib and self hostedVexu
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.