We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Version 1.41.1
Platform 64-bit (Windows)
Description I was using NamedPipeClient's try_write_vectored exactly as detailed in the documentation but noticed that only the first buffer would ever be written. Looking under the hood, it seems to be using the default implementation from std::io::Write, sans an important caveat in the rustdocs:
NamedPipeClient
try_write_vectored
std::io::Write
The default implementation calls write with either the first nonempty buffer provided, or an empty one if none exists.
i.e.,
pub(crate) fn default_read_vectored<F>(read: F, bufs: &mut [IoSliceMut<'_>]) -> Result<usize> where F: FnOnce(&mut [u8]) -> Result<usize>, { let buf = bufs.iter_mut().find(|b| !b.is_empty()).map_or(&mut [][..], |b| &mut **b); read(buf) }
Are these meant to be properly implemented?
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. Yes, we would like these methods to actually perform a vectored read.
Sorry, something went wrong.
No branches or pull requests
Version
1.41.1
Platform
64-bit (Windows)
Description
I was using
NamedPipeClient
'stry_write_vectored
exactly as detailed in the documentation but noticed that only the first buffer would ever be written. Looking under the hood, it seems to be using the default implementation fromstd::io::Write
, sans an important caveat in the rustdocs:i.e.,
Are these meant to be properly implemented?
The text was updated successfully, but these errors were encountered: