PollableReturn

Added in version 2.60.

class PollableReturn

Return value for various IO operations that signal errors via the return value and not necessarily via a Error.

This enum exists to be able to return errors to callers without having to allocate a Error. Allocating Error can be quite expensive for regularly happening errors like WOULD_BLOCK.

In case of FAILED a Error should be set for the operation to give details about the error that happened.

Fields

class PollableReturn
FAILED

Generic error condition for when an operation fails.

OK

The operation was successfully finished.

WOULD_BLOCK

The operation would block.