pub enum Stdio {
Inherit,
Null,
MakePipe,
Fd(FileDesc),
}
Expand description
Description of a stdio stream for a child process
Variants§
Inherit
Inherit the parent’s stdio stream
Null
Use a null stream, like /dev/null
MakePipe
Use a pipe to the input or output of the child process
Fd(FileDesc)
Use an existing file descriptor as the stdio stream
Implementations§
Source§impl Stdio
impl Stdio
pub fn to_child_stdio( &self, readable: bool, ) -> Result<(ChildStdio, Option<AnonPipe>)>
Sourcepub fn piped() -> Stdio
pub fn piped() -> Stdio
Create a pipe for this file descriptor and use it in the child process as
the given file descriptor to facilitate input or output redirection. See
MemFdExecutable::stdin
for an example.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stdio
impl RefUnwindSafe for Stdio
impl Send for Stdio
impl Sync for Stdio
impl Unpin for Stdio
impl UnwindSafe for Stdio
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more