Skip to main content

Module strict

Module strict 

Source
Available on crate feature strict-compat only.
Expand description

Hand-rolled Strict-mode argv parser (AD-007). Public so the rusty-figlet binary can dispatch to its byte-equal upstream diagnostics; the SemVer policy on this module’s surface matches the rest of the public library API per FR-050. Gated by the strict-compat leaf (v0.2+). Hand-rolled Strict-mode argv parser per AD-007.

Mirrors upstream figlet(6) getopt diagnostics byte-for-byte (modulo the figlet:rusty-figlet: program-name substitution applied by the test harness): excluded short flags surface figlet: invalid option -- '<char>'; excluded long flags surface figlet: unrecognized option '<flag>'.

Last-wins semantics for repeated flags (-c/-l/-r, layout flags, -w) per FR-022 + FR-023.

Structs§

StrictArgs
Outcome of parse_argv on success — the resolved argument bag.

Enums§

JustifyKind
Resolved justify-class flag for Strict mode.
LayoutKind
Resolved layout-class flag for Strict mode.
StrictError
Strict-mode parse error. Carries the formatted, byte-equal upstream diagnostic for emission on stderr.

Functions§

format_unknown_flag
Format an unknown-flag diagnostic per FR-042 / FR-043.
parse_argv
Parse argv (NOT including argv[0]) into a StrictArgs. Stops at the first excluded/unknown flag and returns StrictError with the upstream-format diagnostic.