Expand description
Command line front end for iban_validation_rs.
Reads IBANs, one per line, from standard input or from a file, and reports for each whether it is valid together with the bank and branch identifiers when the country registry defines them.
The binary is intentionally a thin wrapper: everything it does is exposed here as plain functions so it can be tested without spawning a process, and so the argument parsing stays dependency free (the core crate has no dependencies, and this crate keeps that property).
Structs§
- Args
- The options a run is driven by, as produced by
parse_args. - Report
- Counts collected over a run, used to pick the process exit code.
Enums§
- Format
- How each result line is rendered.
- Invocation
- What the command line asked for.
Constants§
- CSV_
HEADER - The CSV header, written before the first row in
Format::Csv. - USAGE
- Usage text, also shown when the arguments do not parse.
- USAGE_
EXIT_ CODE - Exit code used when the arguments or the input file could not be used.
Functions§
- exit_
code - Exit code matching a
Report:0when nothing was invalid,1otherwise. - format_
line - Render one already normalized IBAN as an output line, without the trailing newline.
- normalize
- Normalize one input line: surrounding whitespace is always removed, and inner spaces are removed as well when print format input was requested.
- parse_
args - Parse the command line arguments, excluding the program name.
- run
- Validate every line of
input, writing the results tooutput. - version_
text - Version text for
--version, naming the registry the country data was generated from.
Type Aliases§
- Error
- Re-exported so callers of the library do not have to depend on the core crate just to
name the error type they get back from
Iban::new_with.