]>
Commit | Line | Data |
---|---|---|
48663c56 | 1 | use crate::io::{self, IoSlice, IoSliceMut}; |
2c00a5a8 | 2 | |
cdc7bbd5 | 3 | pub struct AnonPipe(!); |
2c00a5a8 XL |
4 | |
5 | impl AnonPipe { | |
6 | pub fn read(&self, _buf: &mut [u8]) -> io::Result<usize> { | |
cdc7bbd5 | 7 | self.0 |
2c00a5a8 XL |
8 | } |
9 | ||
48663c56 | 10 | pub fn read_vectored(&self, _bufs: &mut [IoSliceMut<'_>]) -> io::Result<usize> { |
cdc7bbd5 | 11 | self.0 |
48663c56 XL |
12 | } |
13 | ||
f9f354fc | 14 | pub fn is_read_vectored(&self) -> bool { |
cdc7bbd5 | 15 | self.0 |
f9f354fc XL |
16 | } |
17 | ||
9c376795 FG |
18 | pub fn read_to_end(&self, _buf: &mut Vec<u8>) -> io::Result<usize> { |
19 | self.0 | |
20 | } | |
21 | ||
2c00a5a8 | 22 | pub fn write(&self, _buf: &[u8]) -> io::Result<usize> { |
cdc7bbd5 | 23 | self.0 |
041b39d2 XL |
24 | } |
25 | ||
48663c56 | 26 | pub fn write_vectored(&self, _bufs: &[IoSlice<'_>]) -> io::Result<usize> { |
cdc7bbd5 | 27 | self.0 |
48663c56 XL |
28 | } |
29 | ||
f9f354fc | 30 | pub fn is_write_vectored(&self) -> bool { |
cdc7bbd5 | 31 | self.0 |
f9f354fc XL |
32 | } |
33 | ||
2c00a5a8 | 34 | pub fn diverge(&self) -> ! { |
cdc7bbd5 | 35 | self.0 |
476ff2be SL |
36 | } |
37 | } | |
041b39d2 | 38 | |
2c00a5a8 XL |
39 | pub fn read2(p1: AnonPipe, _v1: &mut Vec<u8>, _p2: AnonPipe, _v2: &mut Vec<u8>) -> io::Result<()> { |
40 | match p1.0 {} | |
041b39d2 | 41 | } |