]> git.proxmox.com Git - rustc.git/blame - library/std/src/sys/unsupported/pipe.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / library / std / src / sys / unsupported / pipe.rs
CommitLineData
48663c56 1use crate::io::{self, IoSlice, IoSliceMut};
2c00a5a8 2
cdc7bbd5 3pub struct AnonPipe(!);
2c00a5a8
XL
4
5impl 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
39pub fn read2(p1: AnonPipe, _v1: &mut Vec<u8>, _p2: AnonPipe, _v2: &mut Vec<u8>) -> io::Result<()> {
40 match p1.0 {}
041b39d2 41}