pub struct Pipeline { /* private fields */ }Expand description
A pipeline of commands to be executed sequentially
Each command’s stdout is piped to the next command’s stdin.
Implementations§
Source§impl Pipeline
impl Pipeline
Sourcepub fn stdin(self, content: impl Into<String>) -> Self
pub fn stdin(self, content: impl Into<String>) -> Self
Set the initial stdin content for the first command
Sourcepub fn env(self, env: HashMap<String, String>) -> Self
pub fn env(self, env: HashMap<String, String>) -> Self
Set environment variables for all commands
Sourcepub fn mirror_output(self, mirror: bool) -> Self
pub fn mirror_output(self, mirror: bool) -> Self
Set whether to mirror output to stdout/stderr
Sourcepub fn capture_output(self, capture: bool) -> Self
pub fn capture_output(self, capture: bool) -> Self
Set whether to capture output
Sourcepub async fn run(self) -> Result<CommandResult>
pub async fn run(self) -> Result<CommandResult>
Execute the pipeline and return the result
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pipeline
impl RefUnwindSafe for Pipeline
impl Send for Pipeline
impl Sync for Pipeline
impl Unpin for Pipeline
impl UnsafeUnpin for Pipeline
impl UnwindSafe for Pipeline
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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