Eio_reader.Impl
In this specific example, we chose to expose the signature of the provider's implementation. This is not something that is usually required, since make
already provides a way to build a provider. This is only done here for the sake of the tests, as we show different ways an interface can be built based on various parts of its implementation.
type nonrec t = t
include Test_interfaces.Directory_reader.Provider_interface.S with type t := t
val readdir : t -> path:Base.string -> Base.string Base.list
Note that not all the interface exported by the module is required for the implementer, indeed only the minimal set of methods upon which we can build all the others. In this case, all that is required is the ability to list entries from a given directory.
include Test_interfaces.File_reader.Provider_interface.S with type t := t
val load : t -> path:Base.string -> Base.string