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 Function

failingOperate

Public Function
std.Io.failingOperate
pub fn failingOperate(userdata: ?*anyopaque, operation: Operation) Cancelable!Operation.Result

Params

Errors

Canceled

Caller has requested the async operation to stop.

File

Io.zig:2961
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
pub fn failingOperate(userdata: ?*anyopaque, operation: Operation) Cancelable!Operation.Result {
    _ = userdata;
    return switch (operation) {
        .file_read_streaming => .{ .file_read_streaming = error.InputOutput },
        .file_write_streaming => .{ .file_write_streaming = error.InputOutput },
        .device_io_control => unreachable,
        .net_receive => .{ .net_receive = .{ error.NetworkDown, 0 } },
        .net_send => .{ .net_send = .{ error.NetworkDown, 0 } },
        .net_read => .{ .net_read = error.NetworkDown },
        .net_write => .{ .net_write = error.NetworkDown },
    };
}