Trait cargo_rx::RunExampleExt
source · [−]pub trait RunExampleExt {
fn run_example<'a, T: IntoIterator>(
&self,
root_path: &'a Path,
name: &'a str,
args: T,
required_features: Option<&'a String>
) -> Result<()>
where
<T as IntoIterator>::Item: AsRef<OsStr>;
}Expand description
Defines the logic for running cargo run --example
Required Methods
fn run_example<'a, T: IntoIterator>(
&self,
root_path: &'a Path,
name: &'a str,
args: T,
required_features: Option<&'a String>
) -> Result<()> where
<T as IntoIterator>::Item: AsRef<OsStr>,
fn run_example<'a, T: IntoIterator>(
&self,
root_path: &'a Path,
name: &'a str,
args: T,
required_features: Option<&'a String>
) -> Result<()> where
<T as IntoIterator>::Item: AsRef<OsStr>,
Call cargo run --example on an example name
Arguments
root_path- the base path to the Cargo directory with aCargo.tomlfile.name- the name of the Cargo example to run.args- arguments to pass to the example script.required_features- any required features to enable when running the example.