You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: multivers.rs
    path of file: ./repos/cargo-multivers/src
    
    the code of the file until where you have to start completion: use std::ffi::OsString;
use std::path::PathBuf;
use std::str::FromStr;
use std::time::Duration;

use anyhow::Context;

use cargo_metadata::{Metadata, Package};

use clap::ColorChoice;

use escargot::CargoBuild;

use serde::Serialize;

use target_lexicon::{Environment, Triple};

use indicatif::{ProgressBar, ProgressStyle};

use itertools::Itertools;

use console::{style, Term};

use sha3::{Digest, Sha3_256};

use crate::cargo::CommandMessagesExt;
use crate::cli::Args;
use crate::features::{CpuFeatures, Cpus};
use crate::metadata::{MultiversMetadata, TargetMetadata};
use crate::runner::RunnerBuilder;

#[derive(Serialize)]
struct BuildDescription {
    path: PathBuf,

    features: Vec<String>,

    #[serde(skip)]
    hash: Option<Vec<u8>>,

    #[serde(skip)]
    original_filename: Option<OsString>,
}

#[derive(Serialize)]
struct BuildsDescription {
    builds: Vec<BuildDescription>,
}

/// Build multiple versions of the same binary, each with a different CPU features set, merged into a single portable optimized binary
pub struct Multivers {
    metadata: Metadata,
    target: String,
    runner: RunnerBuilder,
    workspace: clap_cargo::Workspace,
    target_dir: PathBuf,
    out_dir: Option<PathBuf>,
    features: clap_cargo::Features,
    cpus: Cpus,
    progress: ProgressBar,
    profile: String,
    cargo_args: Vec<String>,
}

impl Multivers {
    pub fn from_args(args: Args) -> anyhow::Result<Self> {
        let metadata = args
            .manifest
            .metadata()
   
    
    pub fn from_args(args: Args) -> anyhow::Result<Self> {
        let metadata = args
            .manifest
            .metadata()
            .exec()
            .context("Failed to execute `cargo metadata`")?;

        // We must set a target, otherwise RUSTFLAGS will be used by the build scripts as well
        // (which we don't want since we might build with features not supported by the CPU building the package).
        // See https://github.com/rust-lang/cargo/issues/4423
        let target = args.target()?.into_owned();

        let cpus = Cpus::builder(target.clone(), args.cpus)
            .context("Failed to get the set of CPU features for the target")?
            .exclude_features(args.exclude_cpu_features.as_deref())
            .build()?;

        let target_dir = metadata
            .target_directory
            .join(clap::crate_name!())
            .into_std_path_buf();

        let runner =
            RunnerBuilder::generate_crate_sources(target_dir.clone(), &args.runner_version)
                .context("Failed to generate the source files of the runner")?;

        let progress = indicatif::ProgressBar::new(0).with_style(
            ProgressStyle::with_template(
                "{prefix:>12.cyan.bold} [{bar:57}] {pos}/{len} {spinner}",
            )?
            .progress_chars("=> "),
        );
        progress.enable_steady_tick(Duration::from_millis(200));

        if args.color == ColorChoice::Never {
            console::set_colors_enabled(false);
        } else if args.color == ColorChoice::Always {
            console::set_colors_enabled(true);
        }

        Ok(Self {
            metadata,
            target,
            runner,
            workspace: args.workspace,
            target_dir,
            out_dir: args.out_dir,
            features: args.features,
            cpus,
            progress,
            cargo_args: args.args,
            profile: args.profile,
        })
    }