1
Fork 0
rust/library/std/src/sys/anonymous_pipe/unsupported.rs
Jiahao XU c9c8a14884
Initial implementation of anonymous_pipe
Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com>
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-07-23 23:13:56 +10:00

26 lines
569 B
Rust

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()
}
}