Arg::exclusive
exclusive
Section titled “exclusive ”This argument must be passed alone; it conflicts with all other arguments.
Example
Section titled “Example”name = "prog"[args]exclusive = { long = "exclusive", action = "set", exclusive = true }debug = { long = "debug" }input = {}
name: progargs: exclusive: long: exclusive action: set exclusive: true debug: long: debug input: {}
{ "name": "prog", "args": { "exclusive": { "long": "exclusive", "action": "set", "exclusive": true }, "debug": { "long": "debug" }, "input": {} }}
prog --exclusive file.conf file.txt
Output
Section titled “Output”error: the argument '--exclusive <exclusive>' cannot be used with one or more of the other specified arguments
Usage: prog [OPTIONS] [input]
For more information, try '--help'.