Skip to main content

gates

Function gates 

Source
pub fn gates(cmd: Command, op: &Operation) -> Command
Expand description

The gate flags one operation names, added to a command of your own.

command puts them on the subcommand it builds, and this is that same door: a verb you write yourself — one that fetches, decides, and then calls a gated operation — adds them with this and spells nothing itself. One definition rather than two is what keeps the two command lines from coming to disagree about one operation, and an Overlay that renames a gate renames the flag on both.

An operation that names no gate is handed back unchanged, so a caller does not have to ask first:

tree::gates(Command::new("finalize-voucher").arg(id).arg(commit), op)