Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

readStreaming

May return fewer bytes than buffer space available, including 0. End-of-stream is indicated by error.EndOfStream.

See also:

File.readStreaming
pub fn readStreaming(file: File, io: Io, buffer: []const []u8) ReadStreamingError!usize

File

lib/std/Io/File.zig:471

Code

pub fn readStreaming(file: File, io: Io, buffer: []const []u8) ReadStreamingError!usize {
    return (try io.operate(.{ .file_read_streaming = .{
        .file = file,
        .data = buffer,
    } })).file_read_streaming;
}