pub struct Command { /* private fields */ }Expand description
Builder for executing a command
Implementations§
Source§impl Command
impl Command
Sourcepub async fn exec(&mut self) -> Result<i32, JsValue>
pub async fn exec(&mut self) -> Result<i32, JsValue>
Executes the command and returns the status code
Sourcepub fn outline<F: Fn(&str) + 'static + Sync + Send>(
&mut self,
callback: F,
) -> &mut Command
pub fn outline<F: Fn(&str) + 'static + Sync + Send>( &mut self, callback: F, ) -> &mut Command
Sets a callback to be called each time a new line is written to standard output. Note that line splitting is done by an internal re-implementation of line splitting and not the GitHub Actions Toolkit one due to issues with the latter.
Sourcepub fn errline<F: Fn(&str) + 'static + Sync + Send>(
&mut self,
callback: F,
) -> &mut Command
pub fn errline<F: Fn(&str) + 'static + Sync + Send>( &mut self, callback: F, ) -> &mut Command
Sets a callback to be called each time a new line is written to standard error. Note that line splitting is done by an internal re-implementation of line splitting and not the GitHub Actions Toolkit one due to issues with the latter.
Sourcepub fn stdout(&mut self, redirect: Stdio) -> &mut Command
pub fn stdout(&mut self, redirect: Stdio) -> &mut Command
Sets where standard output should be directed
Sourcepub fn stderr(&mut self, redirect: Stdio) -> &mut Command
pub fn stderr(&mut self, redirect: Stdio) -> &mut Command
Sets where standard error should be directed
Sourcepub fn current_dir(&mut self, path: &Path) -> &mut Command
pub fn current_dir(&mut self, path: &Path) -> &mut Command
Sets the current working directory of the command
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl !RefUnwindSafe for Command
impl !Send for Command
impl !Sync for Command
impl Unpin for Command
impl !UnwindSafe for Command
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more