package eio

  1. Overview
  2. Docs

Module Eio.GenericSource

A base class for objects that can be queried at runtime for extra features.

Sourcetype 'a ty = ..

An 'a ty is a query for a feature of type 'a.

Sourceclass type t = object ... end
Sourceval probe : t -> 'a ty -> 'a option

probe t feature checks whether t supports feature. This is mostly for internal use. For example, Eio_unix.FD.peek_opt uses this to get the underlying Unix file descriptor from a flow.

OCaml

Innovation. Community. Security.