Module Uring.Res

The result of a uring operation (typically the same as the return value of the corresponding syscall).

type t = private int

The return value. If negative, it is the negative errno value giving the error.

val int_result : t -> (int, Unix.error) Stdlib.result

int_result t is Error _ if t is negative, or Ok t otherwise.

val int_exn : t -> string -> string -> int

int_exn t fn arg raises Unix.Unix_error if t is negative, and returns t otherwise.

val fd_result : t -> (Unix.file_descr, Unix.error) Stdlib.result

fd_result t is like int_result t, but returns t as a file descriptor.

val fd_exn : t -> string -> string -> Unix.file_descr

fd_exn t is like int_exn t, but returns t as a file descriptor.

val pp : t Fmt.t