That involves changing the WriteOwned trait, which is fine, whatever.
This is blocked on #150
context: writev might write an arbitrary number of bytes, you might give it ["hello", "world"] and it may write until the second "o", so then you need your buffer list to be ["rld"]: hence the BufOrSlice enum to be able to give io_uring the address of "rld".
but for http/2 framing reasons, I recently had to do the same thing: splitting Piece, an enum of &'static [u8], HeaderName, Vec<u8>, etc. into PieceCore (that enum), and Piece, an enum with Full and Slice variants.
I'd be fine if writev_allonly accepted PieceList actually.
That involves changing the
WriteOwned
trait, which is fine, whatever.This is blocked on #150
context:
writev
might write an arbitrary number of bytes, you might give it ["hello", "world"] and it may write until the second "o", so then you need your buffer list to be ["rld"]: hence theBufOrSlice
enum to be able to give io_uring the address of"rld"
.but for http/2 framing reasons, I recently had to do the same thing: splitting
Piece
, an enum of&'static [u8]
,HeaderName
,Vec<u8>
, etc. intoPieceCore
(that enum), andPiece
, an enum withFull
andSlice
variants.I'd be fine if
writev_all
only acceptedPieceList
actually.