pub struct StdInCommandBuilder<'a> { /* private fields */ }
Expand description

For adding a stdin to a Command.

Implementations§

Write buffer to stdin when the Command is run.

Examples
use assert_cmd::prelude::*;

use std::process::Command;

let mut cmd = Command::new("cat");
cmd
    .arg("-A")
    .with_stdin()
    .buffer("42");
let output = cmd.unwrap();

Write paths content to stdin when the Command is run.

Paths are relative to the env::current_dir and not Command::current_dir.

Examples
use assert_cmd::prelude::*;

use std::process::Command;

let mut cmd = Command::new("cat");
cmd
    .arg("-A")
    .with_stdin()
    .path("Cargo.toml")
    .unwrap();
let output = cmd.unwrap();

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.