Uwt.Int_resultInt_result.t is used instead of 'a result, if a function returns either an error or a non-negative integer (including unit/bool).
type 'a t = 'a Uwt_base.Int_result.tval is_ok : 'a t -> boolval is_error : 'a t -> boolval to_exn : ?name:string -> ?param:string -> 'a t -> exnwill raise Invalid_argument, if is_error is false
You can use the following values to compare a Int_result.t value with an assumed error, e.g.
let p = Uwt.Stream.try_write t ~buf in
if (p :> int) = Uwt.Int_result.eagain then
...
else
...All values are negative integers, but don't make any further assumption about them. Their concrete values can change with any uwt release.
val eagain : intval e2big : intval eacces : intval eaddrinuse : intval eaddrnotavail : intval eafnosupport : intval eai_addrfamily : intval eai_again : intval eai_badflags : intval eai_badhints : intval eai_canceled : intval eai_fail : intval eai_family : intval eai_memory : intval eai_nodata : intval eai_noname : intval eai_overflow : intval eai_protocol : intval eai_service : intval eai_socktype : intval ealready : intval ebadf : intval ebusy : intval ecanceled : intval echarset : intval econnaborted : intval econnrefused : intval econnreset : intval edestaddrreq : intval eexist : intval efault : intval efbig : intval ehostunreach : intval eintr : intval einval : intval eio : intval eisconn : intval eisdir : intval eloop : intval emfile : intval emsgsize : intval enametoolong : intval enetdown : intval enetunreach : intval enfile : intval enobufs : intval enodev : intval enoent : intval enomem : intval enonet : intval enoprotoopt : intval enospc : intval enosys : intval enotconn : intval enotdir : intval enotempty : intval enotsock : intval enotsup : intval eperm : intval epipe : intval eproto : intval eprotonosupport : intval eprototype : intval erange : intval erofs : intval eshutdown : intval espipe : intval esrch : intval etimedout : intval etxtbsy : intval exdev : intval unknown : intval eof : intval enxio : intval emlink : intval uwt_efatal : int