Error Set ReadError [src]

Errors

AccessDenied ReadError

In WASI, this error occurs when the file descriptor does not hold the required rights to read from it.

BrokenPipe ReadError
Canceled ReadError

reading a timerfd with CANCEL_ON_SET will lead to this error when the clock goes through a discontinuous change

ConnectionResetByPeer ReadError
ConnectionTimedOut ReadError
InputOutput ReadError
IsDir ReadError
LockViolation ReadError

Unable to read file due to lock.

MessageTooBig ReadError
NetworkSubsystemFailed ReadError
NotOpenForReading ReadError
OperationAborted ReadError
ProcessNotFound ReadError

This error occurs in Linux if the process to be read from no longer exists.

SocketNotBound ReadError
SocketNotConnected ReadError
SystemResources ReadError
TlsAlert ReadError

The alert description will be stored in alert.

TlsBadLength ReadError
TlsBadRecordMac ReadError
TlsConnectionTruncated ReadError
TlsDecodeError ReadError
TlsIllegalParameter ReadError
TlsRecordOverflow ReadError
TlsSequenceOverflow ReadError
TlsUnexpectedMessage ReadError
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.

WouldBlock ReadError

This error occurs when no global event loop is configured, and reading from the file descriptor would block.

Source

pub const ReadError = std.crypto.tls.Client.ReadError || std.net.Stream.ReadError