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: package.rs
    path of file: ./repos/turbo/crates/turborepo-repository/src/change_mapper
    
    the code of the file until where you have to start completion: use thiserror::Error;
use turbopath::AnchoredSystemPath;
use wax::{BuildError, Program};

use crate::package_graph::{PackageGraph, PackageName, WorkspacePackage};

pub enum PackageMapping {
    /// We've hit a global file, so all packages have changed
    All,
    /// This change is meaningless, no packages have changed
    None,
    /// This change has affected one package
    Package(WorkspacePackage),
}

/// Maps a single file change to affected packages. This can be a single
/// package (`Package`), none of the packages (`None`), or all of the packages
/// (`All`).
pub trai
    
    fn detect_package(&self, path: &AnchoredSystemPath) -> PackageMapping {
        match DefaultPackageChangeMapper::new(self.pkg_dep_graph).detect_package(path) {
            // Since `DefaultPackageChangeMapper` is overly conservative, we can check here if
            // the path is actually in globalDeps and if not, return it as
            // PackageDetection::Package(WorkspacePackage::root()).
            PackageMapping::All => {
                let cleaned_path = path.clean();
                let in_global_deps = self.global_deps_matcher.is_match(cleaned_path.as_str());

                if in_global_deps {
                    PackageMapping::All
                } else {
                    PackageMapping::Package(WorkspacePackage::root())
                }
            }
            result => result,
        }
    }