Skip to content

Arg::conflicts_with_all

since 0.1.0

This argument is mutually exclusive with the specified arguments.

name = "prog"
[args]
cfg = { long = "config", action = "set", conflicts-with-all = ["debug", "input"] }
debug = { long = "debug", action = "set-true" }
input = {}
Terminal window
prog --config file.conf file.txt
Terminal window
error: the argument '--config <cfg>' cannot be used with '[input]'
Usage: prog --config <cfg> [input]
For more information, try '--help'.