# Trait cargo::util::command_prelude::ArgMatchesExt

source ·

    pub trait ArgMatchesExt {
    Show 29 methods    // Required methods
        fn flag(&self, name: &str) -> bool;
        fn maybe_flag(&self, name: &str) -> bool;
        fn _value_of(&self, name: &str) -> Option<&str>;
        fn _values_of(&self, name: &str) -> Vec<String>;
        fn _value_of_os(&self, name: &str) -> Option<&OsStr>;
        fn _values_of_os(&self, name: &str) -> Vec<OsString>;
        fn _count(&self, name: &str) -> u32;
        fn _contains(&self, name: &str) -> bool;

        // Provided methods
        fn value_of_u32(&self, name: &str) -> CargoResult<Option<u32>> { ... }
        fn value_of_i32(&self, name: &str) -> CargoResult<Option<i32>> { ... }
        fn value_of_path(&self, name: &str, gctx: &GlobalContext) -> Option<PathBuf> { ... }
        fn root_manifest(&self, gctx: &GlobalContext) -> CargoResult<PathBuf> { ... }
        fn workspace<'a>(
            &self,
            gctx: &'a GlobalContext
        ) -> CargoResult<Workspace<'a>> { ... }
        fn jobs(&self) -> CargoResult<Option<JobsConfig>> { ... }
        fn verbose(&self) -> u32 { ... }
        fn dry_run(&self) -> bool { ... }
        fn keep_going(&self) -> bool { ... }
        fn honor_rust_version(&self) -> Option<bool> { ... }
        fn targets(&self) -> CargoResult<Vec<String>> { ... }
        fn get_profile_name(
            &self,
            gctx: &GlobalContext,
            default: &str,
            profile_checking: ProfileChecking
        ) -> CargoResult<InternedString> { ... }
        fn packages_from_flags(&self) -> CargoResult<Packages> { ... }
        fn compile_options(
            &self,
            gctx: &GlobalContext,
            mode: CompileMode,
            workspace: Option<&Workspace<'_>>,
            profile_checking: ProfileChecking
        ) -> CargoResult<CompileOptions> { ... }
        fn cli_features(&self) -> CargoResult<CliFeatures> { ... }
        fn compile_options_for_single_package(
            &self,
            gctx: &GlobalContext,
            mode: CompileMode,
            workspace: Option<&Workspace<'_>>,
            profile_checking: ProfileChecking
        ) -> CargoResult<CompileOptions> { ... }
        fn new_options(&self, gctx: &GlobalContext) -> CargoResult<NewOptions> { ... }
        fn registry_or_index(
            &self,
            gctx: &GlobalContext
        ) -> CargoResult<Option<RegistryOrIndex>> { ... }
        fn registry(&self, gctx: &GlobalContext) -> CargoResult<Option<String>> { ... }
        fn check_optional_opts(
            &self,
            workspace: &Workspace<'_>,
            compile_opts: &CompileOptions
        ) -> CargoResult<()> { ... }
        fn is_present_with_zero_values(&self, name: &str) -> bool { ... }
    }

## Required Methods§

source

#### fn flag(&self, name: &str) -> bool

source

#### fn maybe_flag(&self, name: &str) -> bool

source

#### fn _value_of(&self, name: &str) -> Option<&str>

source

#### fn _values_of(&self, name: &str) -> Vec<String>

source

#### fn _value_of_os(&self, name: &str) -> Option<&OsStr>

source

#### fn _values_of_os(&self, name: &str) -> Vec<OsString>

source

#### fn _count(&self, name: &str) -> u32

source

#### fn _contains(&self, name: &str) -> bool

## Provided Methods§

source

#### fn value_of_u32(&self, name: &str) -> CargoResult<Option<u32>>

source

#### fn value_of_i32(&self, name: &str) -> CargoResult<Option<i32>>

source

#### fn value_of_path(&self, name: &str, gctx: &GlobalContext) -> Option<PathBuf>

Returns value of the `name` command-line argument as an absolute path

source

#### fn root_manifest(&self, gctx: &GlobalContext) -> CargoResult<PathBuf>

source

#### fn workspace<'a>(&self, gctx: &'a GlobalContext) -> CargoResult<Workspace<'a>>

source

#### fn jobs(&self) -> CargoResult<Option<JobsConfig>>

source

#### fn verbose(&self) -> u32

source

#### fn dry_run(&self) -> bool

source

#### fn keep_going(&self) -> bool

source

#### fn honor_rust_version(&self) -> Option<bool>

source

#### fn targets(&self) -> CargoResult<Vec<String>>

source

#### fn get_profile_name( &self, gctx: &GlobalContext, default: &str, profile_checking: ProfileChecking ) -> CargoResult<InternedString>

source

#### fn packages_from_flags(&self) -> CargoResult<Packages>

source

#### fn compile_options( &self, gctx: &GlobalContext, mode: CompileMode, workspace: Option<&Workspace<'_>>, profile_checking: ProfileChecking ) -> CargoResult<CompileOptions>

source

#### fn cli_features(&self) -> CargoResult<CliFeatures>

source

#### fn compile_options_for_single_package( &self, gctx: &GlobalContext, mode: CompileMode, workspace: Option<&Workspace<'_>>, profile_checking: ProfileChecking ) -> CargoResult<CompileOptions>

source

#### fn new_options(&self, gctx: &GlobalContext) -> CargoResult<NewOptions>

source

#### fn registry_or_index( &self, gctx: &GlobalContext ) -> CargoResult<Option<RegistryOrIndex>>

source

#### fn registry(&self, gctx: &GlobalContext) -> CargoResult<Option<String>>

source

#### fn check_optional_opts( &self, workspace: &Workspace<'_>, compile_opts: &CompileOptions ) -> CargoResult<()>

source

#### fn is_present_with_zero_values(&self, name: &str) -> bool

## Implementors§

source§

### impl<'a> ArgMatchesExt for ArgMatches