package async_udp

  1. Overview
  2. Docs
module Ok : sig ... end
include Async.Unix.Syscall_result.S with type ok_value := Ok.t
type t = int
val compare : t -> t -> int
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
include Core_kernel.Equal.S with type t := t
val equal : t Base.Equal.equal
val create_ok : Ok.t -> t
val create_error : Caml_unix.error -> t
val is_ok : t -> bool
val is_error : t -> bool

This returns a preallocated object for all errors and at least a few ok_values, so can be used in many contexts where avoiding allocation is important.

val ok_exn : t -> Ok.t
val error_exn : t -> Caml_unix.error
val reinterpret_error_exn : t -> int

This is more efficient than calling error_exn and then the create_error of the destination type.

val ok_or_unix_error_exn : t -> syscall_name:string -> Ok.t
val ok_or_unix_error_with_args_exn : t -> syscall_name:string -> 'a -> ('a -> Core_kernel.Sexp.t) -> Ok.t
module Optional_syntax : Core_kernel.Optional_syntax.S with type t := t and type value := Ok.t
val poll_again : t
val user_stopped : t
OCaml

Innovation. Community. Security.