Skip to main content

spec_bin

Function spec_bin 

Source
pub fn spec_bin(
    args: impl IntoIterator<Item = impl AsRef<str>>,
    default_bin: &str,
) -> Option<String>
Available on crate feature usage only.
Expand description

Read --usage-spec or --usage-spec=BIN from args, which exclude the program name.

Returns the task name the spec is for: BIN, or default_bin for a bare flag or an empty BIN. Scanning stops at --, so an argument after it never counts.