Trait cargo_rx::RunExampleExt
source · pub trait RunExampleExt {
// Required method
fn run_example<'a, T: IntoIterator>(
&self,
ex_type: &'a ExampleType,
root_path: &'a Path,
name: &'a str,
args: T,
required_features: &'a Option<String>
) -> Result<()>
where <T as IntoIterator>::Item: AsRef<OsStr>;
}Expand description
Defines the logic for running cargo run --example
Required Methods§
sourcefn run_example<'a, T: IntoIterator>(
&self,
ex_type: &'a ExampleType,
root_path: &'a Path,
name: &'a str,
args: T,
required_features: &'a Option<String>
) -> Result<()>where
<T as IntoIterator>::Item: AsRef<OsStr>,
fn run_example<'a, T: IntoIterator>( &self, ex_type: &'a ExampleType, root_path: &'a Path, name: &'a str, args: T, required_features: &'a Option<String> ) -> Result<()>where <T as IntoIterator>::Item: AsRef<OsStr>,
Call cargo run --example on an example name
Arguments
ex_type- Type of example.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.