enum Gio::PollableReturn

Overview

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

This enum exists to be able to return errors to callers without having to allocate a #GError. Allocating #GErrors can be quite expensive for regularly happening errors like %G_IO_ERROR_WOULD_BLOCK.

In case of %G_POLLABLE_RETURN_FAILED a #GError should be set for the operation to give details about the error that happened.

Defined in:

lib/gi-crystal/src/auto/gio-2.0/gio.cr

Enum Members

Failed = 0

Generic error condition for when an operation fails.

Ok = 1

The operation was successfully finished.

WouldBlock = -27

The operation would block.

Class Method Summary

Instance Method Summary

Class methods inherited from struct Enum

g_type : UInt64 g_type

Class Method Detail

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


[View source]

Instance Method Detail

def failed? #

[View source]
def ok? #

[View source]
def would_block? #

[View source]