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: search_unused.rs
    path of file: ./repos/cargo-machete/src
    
    the code of the file until where you have to start completion: use cargo_metadata::CargoOpt;
use grep::{
    matcher::LineTerminator,
    regex::{RegexMatcher, RegexMatcherBuilder},
    searcher::{self, BinaryDetection, Searcher, SearcherBuilder, Sink},
};
use log::{debug, trace};
use rayon::prelude::*;
use std::{
    collections::HashSet,
    error::{self, Error},
    path::{Path, PathBuf},
};
use walkdir::WalkDir;

use crate::UseCargoMetadata;
#[cfg(test)]
use crate::TOP_LEVEL;

use self::meta::PackageMetadata;

mod meta {
    use serde::{Deserialize, Serialize};

    #[derive(Serialize, Deserialize)]
    pub struct PackageMetadata {
        #[serde(rename = "cargo-machete")]
        pub cargo_machete: Option<MetadataFields>,
    }

    #[derive(Serialize, Deserialize)]
    pub struct MetadataFields {
        /// Crates triggering false positives in `cargo-machete`, which should not be reported as
        /// unused.
        pub ignored: Vec<String>,
    }
}

pub(crate) struct PackageAnalysis {
    metadata: Option<ca
    
    fn new(crate_name: &str) -> anyhow::Result<Self> {
        let snaked = crate_name.replace('-', "_");

        let line_matcher = RegexMatcher::new_line_matcher(&make_line_regexp(&snaked))?;
        let line_searcher = SearcherBuilder::new()
            .binary_detection(BinaryDetection::quit(b'\x00'))
            .line_terminator(LineTerminator::byte(b'\n'))
            .line_number(false)
            .build();

        let multiline_matcher = RegexMatcherBuilder::new()
            .multi_line(true)
            .build(&make_multiline_regexp(&snaked))?;
        let multiline_searcher = SearcherBuilder::new()
            .binary_detection(BinaryDetection::quit(b'\x00'))
            .multi_line(true)
            .line_number(false)
            .build();

        // Sanity-check: the matcher must allow multi-line searching.
        debug_assert!(multiline_searcher.multi_line_with_matcher(&multiline_matcher));

        let sink = StopAfterFirstMatch::new();

        Ok(Self {
            line_matcher,
            line_searcher,
            multiline_matcher,
            multiline_searcher,
            sink,
        })
    }