/third_party/rust/crates/clap/src/parser/ |
D | validator.rs | 3 use crate::builder::{Arg, ArgGroup, ArgPredicate, Command, PossibleValue}; 58 .filter(|(_, matched)| matched.check_explicit(&ArgPredicate::IsPresent)) in validate() 102 .filter(|(_, matched)| matched.check_explicit(&ArgPredicate::IsPresent)) in validate_conflicts() 118 matched.check_explicit(&crate::builder::ArgPredicate::IsPresent) in validate_exclusive() 131 .filter(|(_, matched)| matched.check_explicit(&crate::builder::ArgPredicate::IsPresent)) in validate_exclusive() 198 .filter(|(_, matched)| matched.check_explicit(&ArgPredicate::IsPresent)) in build_conflict_err_usage() 224 .filter(|(_, matched)| matched.check_explicit(&ArgPredicate::IsPresent)) in gather_requires() 228 let is_relevant = |(val, req_arg): &(ArgPredicate, Id)| -> Option<Id> { in gather_requires() 254 .filter(|(_, matched)| matched.check_explicit(&ArgPredicate::IsPresent)) in validate_required() 269 .filter(|r| !matcher.check_explicit(r, &ArgPredicate::IsPresent)) in validate_required() [all …]
|
D | arg_matcher.rs | 7 use crate::builder::{Arg, ArgPredicate, Command}; 132 pub(crate) fn check_explicit(&self, arg: &Id, predicate: &ArgPredicate) -> bool { in check_explicit()
|
D | parser.rs | 796 matcher.check_explicit(arg_id, &crate::builder::ArgPredicate::IsPresent) in parse_long_arg() 1430 crate::builder::ArgPredicate::Equals(v) => { in add_default_value() 1433 crate::builder::ArgPredicate::IsPresent => true, in add_default_value() 1560 matcher.check_explicit(arg_id, &crate::builder::ArgPredicate::IsPresent) in did_you_mean_error()
|
/third_party/rust/crates/clap/src/output/ |
D | usage.rs | 8 use crate::builder::{ArgPredicate, Command}; 210 let is_relevant = |(val, req_arg): &(ArgPredicate, Id)| -> Option<Id> { in get_args() 212 ArgPredicate::Equals(_) => false, in get_args() 213 ArgPredicate::IsPresent => true, in get_args() 339 let is_relevant = |(val, req_arg): &(ArgPredicate, Id)| -> Option<Id> { in get_required_usage_from() 341 ArgPredicate::Equals(_) => { in get_required_usage_from() 348 ArgPredicate::IsPresent => true, in get_required_usage_from() 376 .any(|arg| m.check_explicit(arg, &ArgPredicate::IsPresent)) in get_required_usage_from() 404 .map(|m| m.check_explicit(req, &ArgPredicate::IsPresent)) in get_required_usage_from()
|
/third_party/rust/crates/clap/tests/builder/ |
D | default_vals.rs | 4 use clap::builder::ArgPredicate; 190 ArgPredicate::IsPresent, in default_if_arg_present_no_default() 209 ArgPredicate::IsPresent, in default_if_arg_present_no_default_user_override() 229 .default_value_if("opt", ArgPredicate::IsPresent, Some("default")), in default_if_arg_present_no_arg_with_default() 248 .default_value_if("opt", ArgPredicate::IsPresent, Some("default")), in default_if_arg_present_with_default() 267 .default_value_if("opt", ArgPredicate::IsPresent, Some("default")), in default_if_arg_present_with_default_user_override() 286 .default_value_if("opt", ArgPredicate::IsPresent, Some("default")), in default_if_arg_present_no_arg_with_default_user_override() 534 ("opt", ArgPredicate::from("some"), Some("default")), in default_ifs_arg_present() 535 ("flag", ArgPredicate::IsPresent, Some("flg")), in default_ifs_arg_present() 557 ("opt", ArgPredicate::from("some"), Some("default")), in no_default_ifs_arg_present() [all …]
|
D | action.rs | 3 use clap::builder::ArgPredicate; 145 .default_value_if("dog", ArgPredicate::IsPresent, Some("true")), in set_true_with_default_value_if_present() 289 .default_value_if("dog", ArgPredicate::IsPresent, Some("false")), in set_false_with_default_value_if_present() 392 .default_value_if("dog", ArgPredicate::IsPresent, Some("10")), in count_with_default_value_if_present()
|
D | require.rs | 1 use clap::builder::ArgPredicate; 1054 (ArgPredicate::IsPresent, "x"), in issue_1158_app() 1055 (ArgPredicate::IsPresent, "y"), in issue_1158_app() 1056 (ArgPredicate::IsPresent, "z"), in issue_1158_app()
|
/third_party/rust/crates/clap/src/builder/ |
D | arg_predicate.rs | 8 pub enum ArgPredicate { enum 15 impl<S: Into<OsStr>> From<S> for ArgPredicate { implementation
|
D | arg.rs | 14 use crate::builder::ArgPredicate; 64 pub(crate) requires: Vec<(ArgPredicate, Id)>, 78 pub(crate) default_vals_ifs: Vec<(Id, ArgPredicate, Option<OsStr>)>, 733 self.requires.push((ArgPredicate::IsPresent, arg_id)); in requires() 2752 predicate: impl Into<ArgPredicate>, in default_value_if() argument 2772 predicate: impl Into<ArgPredicate>, in default_value_if_os() argument 2865 impl Into<ArgPredicate>, in default_value_ifs() argument 2887 impl Into<ArgPredicate>, in default_value_ifs_os() argument 3417 pub fn requires_if(mut self, val: impl Into<ArgPredicate>, arg_id: impl Into<Id>) -> Self { in requires_if() argument 3495 ifs: impl IntoIterator<Item = (impl Into<ArgPredicate>, impl Into<Id>)>, in requires_ifs() [all …]
|
D | mod.rs | 29 pub use arg_predicate::ArgPredicate;
|
D | command.rs | 19 use crate::builder::{Arg, ArgGroup, ArgPredicate}; 4514 F: Fn(&(ArgPredicate, Id)) -> Option<Id>, in unroll_arg_requires() argument
|
/third_party/rust/crates/clap/src/parser/matches/ |
D | matched_arg.rs | 8 use crate::builder::ArgPredicate; 139 pub(crate) fn check_explicit(&self, predicate: &ArgPredicate) -> bool { in check_explicit() 145 ArgPredicate::Equals(val) => self.raw_vals_flatten().any(|v| { in check_explicit() 153 ArgPredicate::IsPresent => true, in check_explicit()
|
/third_party/rust/crates/clap/ |
D | CHANGELOG.md | 11 - Made `ArgPredicate` `non_exhaustive` 503 - Changed `Arg::requires_ifs` and `Arg::default_value*_ifs*` to taking an `ArgPredicate`, removing … 533 - `Arg::requires_all` in favor of `Arg::requires_ifs` now that it takes an `ArgPredicate` to avoid …
|