pub fn to_cargo_options<'g>(
        &'g self,
        package_graph: &'g PackageGraph,
    ) -> Result<CargoOptions<'g>, Error> {
        let omitted_packages = self
            .omitted_packages
            .to_package_set(package_graph, "resolving omitted-packages")?;

        // TODO: return the features-only set

        let mut options = CargoOptions::new();
        options
            .set_resolver(self.resolver)
            .set_include_dev(self.include_dev)
            .set_initials_platform(self.initials_platform.into())
            .set_host_platform(
                self.host_platform.to_platform_spec().map_err(|err| {
                    Error::TargetSpecError("parsing host platform".to_string(), err)
                })?,
            )
            .set_target_platform(self.target_platform.to_platform_spec().map_err(|err| {
                Error::TargetSpecError("parsing target platform".to_string(), err)
            })?)
            .add_omitted_packages(omitted_packages.package_ids(DependencyDirection::Forward));
        Ok(options)
    }
Creates a new `CargoOptions` from this summary.
guppy/src/graph/summaries.rs