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

Call cargo run --example on an example name

Arguments
  • 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

Implementors