pub trait LivDuct {
// Required methods
fn run_with(
&self,
stdout_fn: fn(_: &Expression) -> Expression,
) -> Result<Output>;
fn run_with_path(&self, path: &Utf8Path) -> Result<Output>;
fn run_with_inherit(&self) -> Result<Output>;
}
Expand description
Trait to allow retrying a command a number of times.
Required Methods§
sourcefn run_with(
&self,
stdout_fn: fn(_: &Expression) -> Expression,
) -> Result<Output>
fn run_with( &self, stdout_fn: fn(_: &Expression) -> Expression, ) -> Result<Output>
Run with the stdout sent to wherever stdout_fn
points to.
You should normally use this instead of the .run()
function, to make sure you don’t
accidentally write stdout to liv’s stdout, as this pollutes stdout, and may cause
liv commands to fail for users.
sourcefn run_with_path(&self, path: &Utf8Path) -> Result<Output>
fn run_with_path(&self, path: &Utf8Path) -> Result<Output>
Run with the stdout sent to path path
.
Alternative to the .run_with()
function as this takes a path argument.
sourcefn run_with_inherit(&self) -> Result<Output>
fn run_with_inherit(&self) -> Result<Output>
Run with the stdout inherited from the parent process.
Implementations on Foreign Types§
source§impl LivDuct for Expression
impl LivDuct for Expression
source§fn run_with(
&self,
stdout_fn: fn(_: &Expression) -> Expression,
) -> Result<Output>
fn run_with( &self, stdout_fn: fn(_: &Expression) -> Expression, ) -> Result<Output>
Run with the stdout sent to wherever stdout_fn
points to.
source§fn run_with_path(&self, path: &Utf8Path) -> Result<Output>
fn run_with_path(&self, path: &Utf8Path) -> Result<Output>
Run with the stdout sent to wherever stdout_fn
points to.
source§fn run_with_inherit(&self) -> Result<Output>
fn run_with_inherit(&self) -> Result<Output>
Run with the stdout inherited from the parent process.