pub struct ExecCommand<'a> { /* private fields */ }Expand description
Builder for executing commands inside a container.
Implementations§
Source§impl<'a> ExecCommand<'a>
impl<'a> ExecCommand<'a>
Sourcepub fn arguments(
self,
values: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn arguments( self, values: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Add multiple arguments.
Sourcepub fn environment_variable(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn environment_variable( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Add an environment variable.
Sourcepub fn environment_variables(
self,
variables: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>,
) -> Self
pub fn environment_variables( self, variables: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>, ) -> Self
Add multiple environment variables.
Sourcepub fn interactive(self) -> Self
pub fn interactive(self) -> Self
Enable interactive mode (–tty –interactive).
Sourcepub fn status(self) -> Result<(), CommandError>
pub fn status(self) -> Result<(), CommandError>
Execute the command and return success or an error.
Auto Trait Implementations§
impl<'a> Freeze for ExecCommand<'a>
impl<'a> RefUnwindSafe for ExecCommand<'a>
impl<'a> Send for ExecCommand<'a>
impl<'a> Sync for ExecCommand<'a>
impl<'a> Unpin for ExecCommand<'a>
impl<'a> UnwindSafe for ExecCommand<'a>
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