Struct distant_core::RemoteProcess
source · pub struct RemoteProcess {
pub stdin: Option<RemoteStdin>,
pub stdout: Option<RemoteStdout>,
pub stderr: Option<RemoteStderr>,
/* private fields */
}
Expand description
Represents a process on a remote machine
Fields§
§stdin: Option<RemoteStdin>
Sender for stdin
stdout: Option<RemoteStdout>
Receiver for stdout
stderr: Option<RemoteStderr>
Receiver for stderr
Implementations§
source§impl RemoteProcess
impl RemoteProcess
sourcepub async fn status(&self) -> Option<RemoteStatus>
pub async fn status(&self) -> Option<RemoteStatus>
Checks if the process has completed, returning the exit status if it has, without
consuming the process itself. Note that this does not include join errors that can
occur when aborting and instead converts any error to a status of false. To acquire
the actual error, you must call wait
sourcepub async fn wait(self) -> Result<RemoteStatus>
pub async fn wait(self) -> Result<RemoteStatus>
Waits for the process to terminate, returning the success status and an optional exit code
sourcepub async fn output(self) -> Result<RemoteOutput>
pub async fn output(self) -> Result<RemoteOutput>
Waits for the process to terminate, returning the success status, an optional exit code, and any remaining stdout and stderr (if still attached to the process)
sourcepub async fn resize(&self, size: PtySize) -> Result<()>
pub async fn resize(&self, size: PtySize) -> Result<()>
Resizes the pty of the remote process if it is attached to one
sourcepub fn clone_resizer(&self) -> RemoteProcessResizer
pub fn clone_resizer(&self) -> RemoteProcessResizer
Clones a copy of the remote process pty resizer
sourcepub fn clone_killer(&self) -> RemoteProcessKiller
pub fn clone_killer(&self) -> RemoteProcessKiller
Clones a copy of the remote process killer