package eio

  1. Overview
  2. Docs

Eio resources backed by an OS file descriptor.

type 'a t = [> `Unix_fd ] as 'a Eio.Resource.t

Resources that have FDs are tagged with `Unix_fd.

type Eio.Resource.pi +=
  1. | T : ('t, 't -> Fd.t, [> `Unix_fd ]) Eio.Resource.pi
val fd : _ t -> Fd.t

fd t returns the FD being wrapped by a resource.

val fd_opt : _ Eio.Resource.t -> Fd.t option

fd_opt t returns the FD being wrapped by a generic resource, if any.

This just probes t using FD.

OCaml

Innovation. Community. Security.