pub struct Stdio(/* private fields */);
Expand description
Describes what to do with a standard I/O stream for a remote child process when passed to the stdin, stdout, and stderr methods of Command.
Implementations§
source§impl Stdio
impl Stdio
sourcepub const fn piped() -> Self
pub const fn piped() -> Self
A new pipe should be arranged to connect the parent and remote child processes.
sourcepub const fn null() -> Self
pub const fn null() -> Self
This stream will be ignored. This is the equivalent of attaching the stream to /dev/null.
sourcepub const fn inherit() -> Self
pub const fn inherit() -> Self
The child inherits from the corresponding parent descriptor.
NOTE that the stdio fd must be in blocking mode, otherwise
ssh might not flush all output since it considers
(EAGAIN
/EWOULDBLOCK
) as an error
sourcepub unsafe fn from_raw_fd_owned(fd: RawFd) -> Self
pub unsafe fn from_raw_fd_owned(fd: RawFd) -> Self
Stdio::from_raw_fd_owned
takes ownership of the fd passed in
and closes the fd on drop.
NOTE that the fd will be put into blocking mode, then it will be
closed when Stdio
is dropped.
§Safety
fd
- must be a valid fd and must give its ownership toStdio
.
Trait Implementations§
source§impl From<ChildStderr> for Stdio
impl From<ChildStderr> for Stdio
source§fn from(arg: ChildStderr) -> Self
fn from(arg: ChildStderr) -> Self
source§impl From<ChildStderr> for Stdio
impl From<ChildStderr> for Stdio
source§fn from(arg: ChildStderr) -> Self
fn from(arg: ChildStderr) -> Self
source§impl From<ChildStdin> for Stdio
impl From<ChildStdin> for Stdio
source§fn from(arg: ChildStdin) -> Self
fn from(arg: ChildStdin) -> Self
source§impl From<ChildStdin> for Stdio
impl From<ChildStdin> for Stdio
source§fn from(arg: ChildStdin) -> Self
fn from(arg: ChildStdin) -> Self
source§impl From<ChildStdout> for Stdio
impl From<ChildStdout> for Stdio
source§fn from(arg: ChildStdout) -> Self
fn from(arg: ChildStdout) -> Self
source§impl From<ChildStdout> for Stdio
impl From<ChildStdout> for Stdio
source§fn from(arg: ChildStdout) -> Self
fn from(arg: ChildStdout) -> Self
source§impl From<PipeRead> for Stdio
impl From<PipeRead> for Stdio
Deprecated, use From<OwnedFd> for Stdio
or
Stdio::from_raw_fd_owned
instead.
source§impl From<PipeWrite> for Stdio
impl From<PipeWrite> for Stdio
Deprecated, use From<OwnedFd> for Stdio
or
Stdio::from_raw_fd_owned
instead.
source§impl FromRawFd for Stdio
impl FromRawFd for Stdio
Deprecated, use Stdio::from_raw_fd_owned
instead.
FromRawFd takes ownership of the fd passed in and closes the fd on drop.
NOTE that the fd must be in blocking mode, otherwise
ssh might not flush all output since it considers
(EAGAIN
/EWOULDBLOCK
) as an error
source§unsafe fn from_raw_fd(fd: RawFd) -> Self
unsafe fn from_raw_fd(fd: RawFd) -> Self
Self
from the given raw file
descriptor. Read more