Error Set SendfileError [src]

Errors

BrokenPipe

out_fd is an unconnected socket, or out_fd closed its read end.

InputOutput

Unspecified error while reading from in_fd.

SystemResources

Insufficient kernel memory to read from in_fd.

Unexpected UnexpectedError

The Operating System returned an undocumented error code.

This error is in theory not possible, but it would be better to handle this error than to invoke undefined behavior.

When this error code is observed, it usually means the Zig Standard Library needs a small patch to add the error code to the error set for the respective function.

Unseekable

offset is not null but the input file is not seekable.

UnsupportedOperation

Descriptor is not valid or locked, or an mmap(2)-like operation is not available for in_fd.

WouldBlock

Nonblocking I/O has been selected but the write would block.

Source

pub const SendfileError = std.posix.UnexpectedError || error{ /// `out_fd` is an unconnected socket, or out_fd closed its read end. BrokenPipe, /// Descriptor is not valid or locked, or an mmap(2)-like operation is not available for in_fd. UnsupportedOperation, /// Nonblocking I/O has been selected but the write would block. WouldBlock, /// Unspecified error while reading from in_fd. InputOutput, /// Insufficient kernel memory to read from in_fd. SystemResources, /// `offset` is not `null` but the input file is not seekable. Unseekable, }