Thomas Leonard 73ec23c3f9 Add Buf_write.with_flow
`with_flow` wraps an Eio sink, flushing to it automatically when the writing fiber blocks.
This is intended to be then normal way of using `Buf_write` from Eio.

Some other changes to Faraday:

- I replaced `yield` with `pause` and `unpause`, as it was unclear to me what it should do.
- `flush` now waits for the flush to complete instead of taking a callback (since we now have effects).
- `operation` is now `await_batch`. It now waits until data is available to write instead of returning `Yield`.
- `shift_buffers` and `shift_flushes` are now tail-recursive.
- Fixed overflow bug in `shift_flushes`.
- Removed `write_` prefix from write functions, as it's now in the module name.
- `string` and `bytes` now check the range is valid.
- `serialize` no longer hangs if it gets receives `Closed.
2022-06-27 14:08:23 +01:00
..
2022-06-27 14:08:23 +01:00
2022-06-27 14:08:23 +01:00
2022-06-27 14:08:23 +01:00
2022-06-27 14:08:23 +01:00
2022-06-27 14:08:23 +01:00