package core_unix

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Syscall_result.File_descrSource

include Ppx_compare_lib.Comparable.S with type t := t
Sourceval compare : t -> t -> int
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
include Core.Equal.S with type t := t
Sourceval create_ok : File_descr.t -> t
Sourceval create_error : Core_unix__.Import.Unix.error -> t
Sourceval is_ok : t -> bool
Sourceval is_error : t -> bool
Sourceval to_result : t -> (File_descr.t, Core_unix__.Import.Unix.error) Core.Result.t

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.

Sourceval ok_exn : t -> File_descr.t
Sourceval error_exn : t -> Core_unix__.Import.Unix.error
Sourceval reinterpret_error_exn : t -> _ t

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

Sourceval ok_or_unix_error_exn : t -> syscall_name:string -> File_descr.t
Sourceval ok_or_unix_error_with_args_exn : t -> syscall_name:string -> 'a -> ('a -> Core.Sexp.t) -> File_descr.t
OCaml

Innovation. Community. Security.