Skip to main content

parse_or_schema

Function parse_or_schema 

Source
pub fn parse_or_schema<T: FdlArgsTrait>() -> T
Expand description

Intercept --fdl-schema and --help, otherwise parse argv.

  • --fdl-schema anywhere in argv: print the JSON schema to stdout, exit 0.
  • --help / -h anywhere in argv: print help to stdout, exit 0.
  • Otherwise: parse via T::try_parse_from.