Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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 standard library. Public Union

ReadBuffer

Public Union
std.os.linux.IoUring.ReadBuffer
pub const ReadBuffer = union(enum)

Used to select how the read should be handled.

Fields

buffer: []u8

io_uring will read directly into this buffer

iovecs: []const posix.iovec

io_uring will read directly into these buffers using readv.

buffer_selection: struct { group_id: u16, len: usize, }

io_uring will select a buffer that has previously been provided with provide_buffers. The buffer group reference by group_id must contain at least one buffer for the read to work. len controls the number of bytes to read into the selected buffer.

File

os/linux/IoUring.zig:371
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
pub const ReadBuffer = union(enum) {
    /// io_uring will read directly into this buffer
    buffer: []u8,

    /// io_uring will read directly into these buffers using readv.
    iovecs: []const posix.iovec,

    /// io_uring will select a buffer that has previously been provided with `provide_buffers`.
    /// The buffer group reference by `group_id` must contain at least one buffer for the read to work.
    /// `len` controls the number of bytes to read into the selected buffer.
    buffer_selection: struct {
        group_id: u16,
        len: usize,
    },
}