about summary refs log tree commit diff
path: root/library/std/src/sys/anonymous_pipe/unsupported.rs
blob: 5962b69203ee2a58898e79169a453bf539d43b8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use crate::{
    io,
    pipe::{PipeReader, PipeWriter},
    process::Stdio,
};

pub(crate) use crate::sys::pipe::AnonPipe;

#[inline]
pub(crate) fn pipe() -> io::Result<(AnonPipe, AnonPipe)> {
    Err(io::Error::UNSUPPORTED_PLATFORM)
}

#[unstable(feature = "anonymous_pipe", issue = "127154")]
impl From<PipeReader> for Stdio {
    fn from(pipe: PipeReader) -> Self {
        pipe.0.diverge()
    }
}

#[unstable(feature = "anonymous_pipe", issue = "127154")]
impl From<PipeWriter> for Stdio {
    fn from(pipe: PipeWriter) -> Self {
        pipe.0.diverge()
    }
}