type t = 'a t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
include Base.Equal.S with type t := t
val equal : t Base.Equal.equal
val create_error : Unix.error -> t
val is_ok : t -> bool
val is_error : t -> bool
val to_result : t -> (M.t, Unix.error) Core_kernel.Result.t
This returns a preallocated object for all errors and at least a few ok_value
s, so can be used in many contexts where avoiding allocation is important.
val error_exn : t -> Unix.error
This is more efficient than calling error_exn
and then the create_error
of the destination type.
val ok_or_unix_error_with_args_exn : t -> syscall_name:string -> 'a -> ('a -> Core_kernel.Sexp.t) -> M.t
module Optional_syntax : Core_kernel.Optional_syntax.S with type t := t and type value := M.t