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
Converts to this type from the input type.
Source§impl From<ChildStdin> for Stdio
impl From<ChildStdin> for Stdio
Source§fn from(arg: ChildStdin) -> Self
fn from(arg: ChildStdin) -> Self
Converts to this type from the input type.
Source§impl From<ChildStdout> for Stdio
impl From<ChildStdout> for Stdio
Source§fn from(arg: ChildStdout) -> Self
fn from(arg: ChildStdout) -> Self
Converts to this type from the input type.
Source§impl TryFrom<ChildStderr> for Stdio
impl TryFrom<ChildStderr> for Stdio
Source§impl TryFrom<ChildStderr> for Stdio
impl TryFrom<ChildStderr> for Stdio
Source§impl TryFrom<ChildStdin> for Stdio
impl TryFrom<ChildStdin> for Stdio
Source§impl TryFrom<ChildStdin> for Stdio
impl TryFrom<ChildStdin> for Stdio
Source§impl TryFrom<ChildStdout> for Stdio
impl TryFrom<ChildStdout> for Stdio
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