It would be handy if the flow returned by Eio.Flow.buffer_sink was closable, so it can be used by functions which close the flow.
The new signature would then be:
val buffer_sink : Stdlib.Buffer.t -> [ sink_ty | `Close ] Std.r
Questions:
- Does this make sense to you? Would you accept a PR for that?
- Should
close () be implemented as a no-op, or should it make further write actions throw an exception?
- Is the new signature backwards-compatible enough, or would that require a second function like
closable_buffer_sink?