pub struct RemoteCommand { /* private fields */ }Expand description
A checked description of one remote process. Pure data: nothing is spawned by constructing, cloning or inspecting it.
Implementations§
Source§impl RemoteCommand
impl RemoteCommand
Sourcepub fn new(
program: impl Into<OsString>,
args: Vec<OsString>,
cwd: &Path,
) -> Result<Self, RemoteCommandError>
pub fn new( program: impl Into<OsString>, args: Vec<OsString>, cwd: &Path, ) -> Result<Self, RemoteCommandError>
Admit one command. Refuses an empty program, NUL bytes in the
program, arguments or working directory, a non-absolute working
directory, and values that cannot be represented as native
POSIX bytes. The program may be a bare name (remote PATH
lookup) or contain / (direct path).
pub fn python( script: &str, args: Vec<OsString>, cwd: &Path, ) -> Result<Self, RemoteCommandError>
pub fn program(&self) -> &RemoteProgram
pub fn args(&self) -> &[OsString]
pub fn cwd(&self) -> &Path
Sourcepub fn with_deadline(self, deadline: Duration) -> Self
pub fn with_deadline(self, deadline: Duration) -> Self
Override the wall-clock budget. Still a pure description.
Trait Implementations§
Source§impl Clone for RemoteCommand
impl Clone for RemoteCommand
Source§fn clone(&self) -> RemoteCommand
fn clone(&self) -> RemoteCommand
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RemoteCommand
impl RefUnwindSafe for RemoteCommand
impl Send for RemoteCommand
impl Sync for RemoteCommand
impl Unpin for RemoteCommand
impl UnsafeUnpin for RemoteCommand
impl UnwindSafe for RemoteCommand
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