Legend:
Library
Module
Module type
Parameter
Class
Class type
Like Rpc.Pipe_rpc.Direct_stream_writer.Group, but with the ability to maintain multiple subgroups. One Rpc.Pipe_rpc.Direct_stream_writer.Group is maintained per implemented RPC, so values are only converted and serialized once per RPC.
Since values are only converted once, the functions passed to Babel.Callee.Pipe_rpc_direct.{filter_,}map_response must be pure, or unexpected results can occur. To determine whether two direct stream writers can be combined, Direct_stream_writer.t contains a type id for the output type, and a unique Transformation_id that is intended to uniquely identify the conversion function from the input type to the output type.
Because the library has no way of automatically identifying whether two 'a
Direct_stream_writer.t's with output type 'b have the same conversion function 'a
-> 'b option, users must promise that the Transformation_id.t is never re-used with a different function. To take advantage of the grouping, the Expert functions above must be used to create the writer. Using the non expert writers will result in a direct stream writer which cannot be combined and will be put in its own group. Babel.Callee.Pipe_rpc_direct.{filter_,}map_response use the Expert functions so they can be combined.