vendor IoBuf
/IoBufMut
from tokio-uring
#24
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the draft PR for
open_at
support we need anOpenOptions
struct. Sadly we can't re-use the one fromtokio-uring
because it doesn't have a public API for the conversion of OpenOptions into the relevant libc flags.We created a PR asking for such an API, but, in the meantime, let's unblock ourselves by vendoring the pieces of
tokio-uring
that we need, and cusotmize them as needed.This PR starts that effort by vendoring the
IoBuf
/IoBufMut
traits as well astokio-uring
's approach to support slice-like operations.Support for
OpenOptions
will follow as part of the PR that addsopen_at
support on top of this PR.The files that reproduce the
tokio-uring
LICENSE text at the top are copied fromtokio-uring.git:d5e90539bd6d1c518e848298564a098c300866bc
.Files without it were written by myself.
To make
cargo test
pass, I had to remove the examples in the doc comments.