Struct openssh::Stdio

source ·
pub struct Stdio(_);
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

A new pipe should be arranged to connect the parent and remote child processes.

This stream will be ignored. This is the equivalent of attaching the stream to /dev/null.

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

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 to Stdio.

Trait Implementations

Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.

Deprecated, use From<OwnedFd> for Stdio or Stdio::from_raw_fd_owned instead.

Converts to this type from the input type.

Deprecated, use From<OwnedFd> for Stdio or Stdio::from_raw_fd_owned instead.

Converts to this type from the input type.
Converts to this type from the input type.

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

Constructs a new instance of Self from the given raw file descriptor. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.