Enum memfd_exec::Stdio
source · 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.
Auto Trait Implementations§
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