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§

source

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 a Cargo.toml file.
  • 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.

Implementations on Foreign Types§

source§

impl RunExampleExt for CommonOptions

source§

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>,

Implementors§