package eio

  1. Overview
  2. Docs
Effect-based direct-style IO API for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

eio-0.14.tbz
sha256=52f85b947d3e0de70940b5bbaac0d3e78841fea5648e73af7d8a754ab51c871b
sha512=944095b1131d2dcc1f0d415fe46fd78b883733e0f95985e3a0feafe73b1703606ec60560abf36c16c364cc60164b7330f236e39569e264c702bb5647e28bfd3c

doc/eio.unix/Eio_unix/Resource/index.html

Module Eio_unix.ResourceSource

Eio resources backed by an OS file descriptor.

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

Resources that have FDs are tagged with `Unix_fd.

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

fd t returns the FD being wrapped by a resource.

Sourceval 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.