MCPcopy Index your code
hub / github.com/assert-rs/assert_cmd / cargo_bin

Method cargo_bin

src/cmd.rs:70–73  ·  view source on GitHub ↗

Create a `Command` to run a specific binary of the current crate. See the [`cargo` module documentation][crate::cargo] for caveats and workarounds. Cargo support: - `>1.94`: works - `>=1.91,<=1.93`: works with default `build-dir` - `<=1.92`: works # Panic Panicks if no binary is found # Examples ```rust,no_run use assert_cmd::Command; use assert_cmd::pkg_name; let mut cmd = Command::cargo_b

(name: S)

Source from the content-addressed store, hash-verified

68 /// ```
69 ///
70 pub fn cargo_bin<S: AsRef<str>>(name: S) -> Result<Self, crate::cargo::CargoError> {
71 let cmd = crate::cargo::cargo_bin_cmd(name)?;
72 Ok(Self::from_std(cmd))
73 }
74
75 /// Write `buffer` to `stdin` when the `Command` is run.
76 ///

Callers

nothing calls this directly

Calls 1

cargo_bin_cmdFunction · 0.85

Tested by

no test coverage detected