Lines Matching refs:ArgPredicate
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));
2658 /// # use clap::builder::{ArgPredicate};
2665 /// .default_value_if("flag", ArgPredicate::IsPresent, Some("default")))
2753 predicate: impl Into<ArgPredicate>,
2773 predicate: impl Into<ArgPredicate>,
2838 /// # use clap::builder::ArgPredicate;
2849 /// ("flag", ArgPredicate::IsPresent, Some("default")),
2850 /// ("opt", ArgPredicate::Equals("channal".into()), Some("chan")),
2866 impl Into<ArgPredicate>,
2888 impl Into<ArgPredicate>,
3362 /// Require another argument if this arg matches the [`ArgPredicate`]
3365 /// if this arg (`self`) matches the [`ArgPredicate`].
3418 pub fn requires_if(mut self, val: impl Into<ArgPredicate>, arg_id: impl Into<Id>) -> Self {
3426 /// [`ArgPredicate`].
3466 /// Setting `Arg::requires_ifs` with [`ArgPredicate::IsPresent`] and *not* supplying all the
3470 /// # use clap::{Command, Arg, error::ErrorKind, ArgAction, builder::ArgPredicate};
3475 /// (ArgPredicate::IsPresent, "input"),
3476 /// (ArgPredicate::IsPresent, "output"),
3496 ifs: impl IntoIterator<Item = (impl Into<ArgPredicate>, impl Into<Id>)>,
3509 self.requires_ifs(ids.into_iter().map(|id| (ArgPredicate::IsPresent, id)))