Skip to main content

opt

Function opt 

Source
pub(crate) fn opt<T: Clone + Send + Sync + 'static>(
    m: &ArgMatches,
    id: &str,
) -> Option<T>
Expand description

One getter for a value that may not have been given or may not exist here.

ArgMatches::get_one panics on an id the matched subcommand does not declare, and one Config is built for the server, the proxy and the three offload verbs, which declare three different subsets of the same flags. “Not given” and “not a flag of this mode” are the same answer to load_from, so they are the same answer here.