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.
Zig › std/ › Io/ › Threaded.zig › ntWriteFileResult
ntWriteFileResult
Threaded.ntWriteFileResult
fn ntWriteFileResult (io_status_block : *const windows .IO_STATUS_BLOCK ) !usize
File
Code
fn ntWriteFileResult (io_status_block : *const windows .IO_STATUS_BLOCK ) !usize {
switch (io_status_block .u .Status ) {
.PENDING => unreachable ,
.CANCELLED => unreachable ,
.SUCCESS => return io_status_block .Information ,
.INVALID_USER_BUFFER => return error .SystemResources ,
.NO_MEMORY => return error .SystemResources ,
.QUOTA_EXCEEDED => return error .SystemResources ,
.PIPE_BROKEN => return error .BrokenPipe ,
.INVALID_HANDLE => return error .NotOpenForWriting ,
.FILE_LOCK_CONFLICT => return error .LockViolation ,
.ACCESS_DENIED => return error .AccessDenied ,
.WORKING_SET_QUOTA => return error .SystemResources ,
.DISK_FULL => return error .NoSpaceLeft ,
else => |status | return windows .unexpectedStatus (status ),
}
}