]> git.lizzy.rs Git - rust.git/blob - library/std/src/sys/unsupported/pipe.rs
Preparing for merge from rustc
[rust.git] / library / std / src / sys / unsupported / pipe.rs
1 use crate::io::{self, IoSlice, IoSliceMut};
2
3 pub struct AnonPipe(!);
4
5 impl AnonPipe {
6     pub fn read(&self, _buf: &mut [u8]) -> io::Result<usize> {
7         self.0
8     }
9
10     pub fn read_vectored(&self, _bufs: &mut [IoSliceMut<'_>]) -> io::Result<usize> {
11         self.0
12     }
13
14     pub fn is_read_vectored(&self) -> bool {
15         self.0
16     }
17
18     pub fn write(&self, _buf: &[u8]) -> io::Result<usize> {
19         self.0
20     }
21
22     pub fn write_vectored(&self, _bufs: &[IoSlice<'_>]) -> io::Result<usize> {
23         self.0
24     }
25
26     pub fn is_write_vectored(&self) -> bool {
27         self.0
28     }
29
30     pub fn diverge(&self) -> ! {
31         self.0
32     }
33 }
34
35 pub fn read2(p1: AnonPipe, _v1: &mut Vec<u8>, _p2: AnonPipe, _v2: &mut Vec<u8>) -> io::Result<()> {
36     match p1.0 {}
37 }