Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop BufOrSlice, just use Piece for everything. #153

Closed
fasterthanlime opened this issue Mar 29, 2024 · 1 comment · Fixed by #164
Closed

Drop BufOrSlice, just use Piece for everything. #153

fasterthanlime opened this issue Mar 29, 2024 · 1 comment · Fixed by #164

Comments

@fasterthanlime
Copy link
Collaborator

fasterthanlime commented Mar 29, 2024

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_all only accepted PieceList actually.

@fasterthanlime fasterthanlime changed the title Drop BufOrSlice, just use Piece for everything. Drop BufOrSlice, just use Piece for everything. Mar 29, 2024
fasterthanlime added a commit that referenced this issue Apr 1, 2024
github-merge-queue bot pushed a commit that referenced this issue Apr 1, 2024
@fasterthanlime
Copy link
Collaborator Author

Closed by #166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant