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.

io_uring_probe

linux.io_uring_probe
pub const io_uring_probe = extern struct

File

lib/std/os/linux.zig:7716

Code

pub const io_uring_probe = extern struct {
    /// Last opcode supported
    last_op: IORING_OP,
    /// Length of ops[] array below
    ops_len: u8,
    resv: u16,
    resv2: [3]u32,
    ops: [256]io_uring_probe_op,

    /// Is the operation supported on the running kernel.
    pub fn is_supported(self: @This(), op: IORING_OP) bool {
        const i = @backingInt(op);
        if (i > @backingInt(self.last_op) or i >= self.ops_len)
            return false;
        return self.ops[i].is_supported();
    }
}