For fixed size reads or partial writes, you might not want to read/write to the end of the buffer. In the borrowed case, you would just slice for this, but that isn't possible here. So we probably want some mechanism to limit the usable length of the buffer. For writes, we read out of the filled part, so we should have a start limit too. I.e., we want to have a slice view of the underlying buffer.
An alternative is to properly support 'owned slices' but I think this gets complicated and requires reference counting or similar.
For fixed size reads or partial writes, you might not want to read/write to the end of the buffer. In the borrowed case, you would just slice for this, but that isn't possible here. So we probably want some mechanism to limit the usable length of the buffer. For writes, we read out of the filled part, so we should have a start limit too. I.e., we want to have a slice view of the underlying buffer.
An alternative is to properly support 'owned slices' but I think this gets complicated and requires reference counting or similar.