Enum ubend::PipeSetup [−][src]
pub enum PipeSetup {
Inherit,
Pipe,
Null,
Redirect(Target),
Temp,
FileDescr(c_int),
FileName(String, Mode),
File(File),
}Setup a pipe.
Variants
InheritInherit the stream from the parent process. This is the default for stderr and for stdin of the first process in the pipe chain.
PipeOpen a pipe to the parent process or between processes. This is the default for stdout and for stdin of all but the first process in the pipe chain.
NullOpen a pipe to /dev/null.
Redirect(Target)Redirect this stream to the specified target stream. Only stdout and stderr can be redirected this way and only to each other. If a stream is redirected to itself it is equivalent to [PipeSetup::Pipe].
TempConnect the stream to a temp file. If supported this is done via the
operating systems native temp file support using the O_TMPFILE flag.
Such a file is written to the hard disk, but has no name and will be
deleted after the file handle to it is closed.
If the operating system or filesystem of /tmp does not support the
O_TMPFILE flag the same behaviour is emulated by opening a new file
using mkstemp() and then immediately unlink()ed.
FileDescr(c_int)Connect the stream to the specified file descriptor. Note that error or not any passed file descriptor will be consumed (closed) by [Chain::new()].
FileName(String, Mode)Connect the stream to the specified file using the specified mode.
File(File)Connect the stream to the specified file. Note that error or not any passed file will be consumed (closed) by [Chain::new()].
Methods
impl PipeSetup[src]
impl PipeSetuppub fn is_redirect(&self) -> bool[src]
pub fn is_redirect(&self) -> boolpub fn is_redirect_to(&self, target: Target) -> bool[src]
pub fn is_redirect_to(&self, target: Target) -> boolpub fn is_inherit(&self) -> bool[src]
pub fn is_inherit(&self) -> boolpub fn is_pipe(&self) -> bool[src]
pub fn is_pipe(&self) -> boolpub fn is_null(&self) -> bool[src]
pub fn is_null(&self) -> boolpub fn is_temp(&self) -> bool[src]
pub fn is_temp(&self) -> boolpub fn is_any_file(&self) -> bool[src]
pub fn is_any_file(&self) -> boolpub fn is_file(&self) -> bool[src]
pub fn is_file(&self) -> boolpub fn is_file_descr(&self) -> bool[src]
pub fn is_file_descr(&self) -> boolpub fn is_file_name(&self) -> bool[src]
pub fn is_file_name(&self) -> boolimpl PipeSetup[src]
impl PipeSetuppub fn into_pipe_setup(self, mode: Mode) -> PipeSetup[src]
pub fn into_pipe_setup(self, mode: Mode) -> PipeSetupTrait Implementations
impl Debug for PipeSetup[src]
impl Debug for PipeSetupfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl IntoPipeSetup for PipeSetup[src]
impl IntoPipeSetup for PipeSetupfn into_pipe_setup(self, mode: Mode) -> PipeSetup[src]
fn into_pipe_setup(self, mode: Mode) -> PipeSetup