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.