diff options
| author | Steven Fackler <sfackler@gmail.com> | 2019-04-27 08:34:08 -0700 | 
|---|---|---|
| committer | Steven Fackler <sfackler@gmail.com> | 2019-04-27 08:34:08 -0700 | 
| commit | bd177f3ea31e47b94dd400239a9badfe2bd47355 (patch) | |
| tree | d6bc8669ce10dbb427760147938821f464fd606a /src/libstd/sys/windows/io.rs | |
| parent | d4a32d504a5aa49b951bfc70602a9615cb772acf (diff) | |
| download | rust-bd177f3ea31e47b94dd400239a9badfe2bd47355.tar.gz rust-bd177f3ea31e47b94dd400239a9badfe2bd47355.zip | |
Stabilized vectored IO
This renames `std::io::IoVec` to `std::io::IoSlice` and `std::io::IoVecMut` to `std::io::IoSliceMut`, and stabilizes `std::io::IoSlice`, `std::io::IoSliceMut`, `std::io::Read::read_vectored`, and `std::io::Write::write_vectored`. Closes #58452
Diffstat (limited to 'src/libstd/sys/windows/io.rs')
| -rw-r--r-- | src/libstd/sys/windows/io.rs | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/src/libstd/sys/windows/io.rs b/src/libstd/sys/windows/io.rs index 54dd271c9d6..c045a63e911 100644 --- a/src/libstd/sys/windows/io.rs +++ b/src/libstd/sys/windows/io.rs @@ -3,16 +3,16 @@ use crate::slice; use crate::sys::c; #[repr(transparent)] -pub struct IoVec<'a> { +pub struct IoSlice<'a> { vec: c::WSABUF, _p: PhantomData<&'a [u8]>, } -impl<'a> IoVec<'a> { +impl<'a> IoSlice<'a> { #[inline] - pub fn new(buf: &'a [u8]) -> IoVec<'a> { + pub fn new(buf: &'a [u8]) -> IoSlice<'a> { assert!(buf.len() <= c::ULONG::max_value() as usize); - IoVec { + IoSlice { vec: c::WSABUF { len: buf.len() as c::ULONG, buf: buf.as_ptr() as *mut u8 as *mut c::CHAR, @@ -29,16 +29,16 @@ impl<'a> IoVec<'a> { } } -pub struct IoVecMut<'a> { +pub struct IoSliceMut<'a> { vec: c::WSABUF, _p: PhantomData<&'a mut [u8]>, } -impl<'a> IoVecMut<'a> { +impl<'a> IoSliceMut<'a> { #[inline] - pub fn new(buf: &'a mut [u8]) -> IoVecMut<'a> { + pub fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { assert!(buf.len() <= c::ULONG::max_value() as usize); - IoVecMut { + IoSliceMut { vec: c::WSABUF { len: buf.len() as c::ULONG, buf: buf.as_mut_ptr() as *mut c::CHAR, | 
