We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Stdio::make_pipe
1 parent 10d9ecd commit 8b93147Copy full SHA for 8b93147
library/std/src/process.rs
@@ -1273,6 +1273,22 @@ impl Stdio {
1273
pub fn null() -> Stdio {
1274
Stdio(imp::Stdio::Null)
1275
}
1276
+
1277
+ /// Returns `true` if this requires [`Command`] to create a new pipe.
1278
+ ///
1279
+ /// # Example
1280
1281
+ /// ```
1282
+ /// #![feature(stdio_makes_pipe)]
1283
+ /// use std::process::Stdio;
1284
1285
+ /// let io = Stdio::piped();
1286
+ /// assert_eq!(io.makes_pipe(), true);
1287
1288
+ #[unstable(feature = "stdio_makes_pipe", issue = "98288")]
1289
+ pub fn makes_pipe(&self) -> bool {
1290
+ matches!(self.0, imp::Stdio::MakePipe)
1291
+ }
1292
1293
1294
impl FromInner<imp::Stdio> for Stdio {
0 commit comments