-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
io: add AsyncWriteExt::write_vectored
#3678
Conversation
pub struct WriteVectored<'a, 'b, W: ?Sized> { | ||
writer: &'a mut W, | ||
bufs: &'a [IoSlice<'b>], | ||
// Make this future `!Unpin` for compatibility with async trait methods. | ||
#[pin] | ||
_pin: PhantomPinned, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh I'm not totally sure we need two lifetimes here. The test case in the docs works where both are 'a
but not sure if that could break some use cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer having both lifetimes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems good to me. 👍
Do we want a write_all_vectored
too?
Yeah that would be cool. I'll make an issue to add it. |
Wow. That was super quick. Thanks a lot! |
Fixes #3676
cc @kaimast