package eio

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

Install

Dune Dependency

Authors

Maintainers

Sources

eio-0.10.tbz
sha256=390f7814507b8133d6c25e3a67a742d731c7ca66252b287b1fb0e3ad4d10eecc
sha512=9c0c9088b178df9799aaae9deb803a802228f1329cbe452479c90e80a13985d9c364ea86ee14e4e759133940f9f6065c7e8ece509d176fb1e347c5320f00a494

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

Module Eio_unix.ResourceSource

Eio resources backed by an OS file descriptor.

Sourcetype t = < fd : Fd.t >

Resources that have FDs are sub-types of t.

Sourceval fd : < t.. > -> Fd.t

fd t returns the FD being wrapped by a resource.

Sourcetype Eio.Generic.ty +=
  1. | FD : Fd.t Eio.Generic.ty
    (*

    Resources that wrap FDs can handle this in their probe method to expose the FD.

    *)
Sourceval fd_opt : Eio.Generic.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.