2019-04-27 08:34:08 -07:00
|
|
|
use crate::io::{self, IoSlice, IoSliceMut};
|
2019-02-11 04:23:21 +09:00
|
|
|
use crate::sys::Void;
|
2018-01-11 11:21:42 +01:00
|
|
|
|
|
|
|
|
pub struct AnonPipe(Void);
|
|
|
|
|
|
|
|
|
|
impl AnonPipe {
|
|
|
|
|
pub fn read(&self, _buf: &mut [u8]) -> io::Result<usize> {
|
|
|
|
|
match self.0 {}
|
|
|
|
|
}
|
|
|
|
|
|
2019-04-27 08:34:08 -07:00
|
|
|
pub fn read_vectored(&self, _bufs: &mut [IoSliceMut<'_>]) -> io::Result<usize> {
|
std: Add `{read,write}_vectored` for more types
This commit implements the `{read,write}_vectored` methods on more types
in the standard library, namely:
* `std::fs::File`
* `std::process::ChildStd{in,out,err}`
* `std::io::Std{in,out,err}`
* `std::io::Std{in,out,err}Lock`
* `std::io::Std{in,out,err}Raw`
Where supported the OS implementations hook up to native support,
otherwise it falls back to the already-defaulted implementation.
2019-04-10 12:51:25 -07:00
|
|
|
match self.0 {}
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-03 11:26:05 -08:00
|
|
|
pub fn can_read_vectored(&self) -> bool {
|
|
|
|
|
match self.0 {}
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-11 11:21:42 +01:00
|
|
|
pub fn write(&self, _buf: &[u8]) -> io::Result<usize> {
|
|
|
|
|
match self.0 {}
|
|
|
|
|
}
|
|
|
|
|
|
2019-04-27 08:34:08 -07:00
|
|
|
pub fn write_vectored(&self, _bufs: &[IoSlice<'_>]) -> io::Result<usize> {
|
std: Add `{read,write}_vectored` for more types
This commit implements the `{read,write}_vectored` methods on more types
in the standard library, namely:
* `std::fs::File`
* `std::process::ChildStd{in,out,err}`
* `std::io::Std{in,out,err}`
* `std::io::Std{in,out,err}Lock`
* `std::io::Std{in,out,err}Raw`
Where supported the OS implementations hook up to native support,
otherwise it falls back to the already-defaulted implementation.
2019-04-10 12:51:25 -07:00
|
|
|
match self.0 {}
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-11 18:02:52 -07:00
|
|
|
pub fn is_write_vectored(&self) -> bool {
|
2020-01-03 11:26:05 -08:00
|
|
|
match self.0 {}
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-11 11:21:42 +01:00
|
|
|
pub fn diverge(&self) -> ! {
|
|
|
|
|
match self.0 {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub fn read2(p1: AnonPipe, _v1: &mut Vec<u8>, _p2: AnonPipe, _v2: &mut Vec<u8>) -> io::Result<()> {
|
|
|
|
|
match p1.0 {}
|
|
|
|
|
}
|