Skip to main content

Module validation

Module validation 

Source
Expand description

Reusable CLI argument validators.

Provides value_parser compatible functions for clap argument validation. Each validator returns Result<T, String> as required by clap.

Structs§

TagEntry
Tag entry parsed from CLI argument.

Functions§

parse_nonzero_count
Validates that a count value is at least 1.
parse_port
Validates that a port number is within the usable range (1–65535).
parse_tag
Parses a tag argument in the format “key=value” or “label”.
tags_from_entries
Converts a slice of TagEntry into a Tags object.