Currently, we use `managed_bytes` to represent fragmented sequences of bytes. In some cases, the type corresponds to generic bytes, while in some other cases -- to strings of actual text. Because of that, it's very easy to get confused what use `managed_bytes` serve in a specific piece of code. We should avoid it. In this commit, we're introducing basic wrappers over `managed_bytes` and `bytes_ostream` with a promise that they represent UTF-8-encoded strings. The interface of those types are pretty basic, but they should be sufficient for the most common use: filling a stream with characters and then extracting a fragmented buffer from it.
3.7 KiB
3.7 KiB