Stdio::make_pipe
This commit is contained in:
parent
10d9ecda48
commit
8b93147f7e
1 changed files with 16 additions and 0 deletions
|
@ -1273,6 +1273,22 @@ impl Stdio {
|
||||||
pub fn null() -> Stdio {
|
pub fn null() -> Stdio {
|
||||||
Stdio(imp::Stdio::Null)
|
Stdio(imp::Stdio::Null)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns `true` if this requires [`Command`] to create a new pipe.
|
||||||
|
///
|
||||||
|
/// # Example
|
||||||
|
///
|
||||||
|
/// ```
|
||||||
|
/// #![feature(stdio_makes_pipe)]
|
||||||
|
/// use std::process::Stdio;
|
||||||
|
///
|
||||||
|
/// let io = Stdio::piped();
|
||||||
|
/// assert_eq!(io.makes_pipe(), true);
|
||||||
|
/// ```
|
||||||
|
#[unstable(feature = "stdio_makes_pipe", issue = "98288")]
|
||||||
|
pub fn makes_pipe(&self) -> bool {
|
||||||
|
matches!(self.0, imp::Stdio::MakePipe)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FromInner<imp::Stdio> for Stdio {
|
impl FromInner<imp::Stdio> for Stdio {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue