Module Directory_reader.Provider_interface

Such abstraction will export a way for implementers (providers) to provide the implementation required by that interface. In Eio naming conventions, these modules are typically named Pi.

module type S = sig ... end
val make : (module S with type t = 't) -> ('t, tag) Provider.t

make (module Impl) creates a provider that implements the directory reader functionality. Another option is to use the constructor Directory_reader below.

val directory_reader : ('t, (module S with type t = 't), [> tag ]) Provider.Trait.t

The actual trait constructor may or may not be exported by the provider interface -- either way works. That's left as a programmer's preference depending on the context. When this constructor is exported, you can use it in conjunction with Provider.implement.