Skip to main content

Module parsers

Module parsers 

Source
Expand description

Dual-format argument parser: accepts Unix epoch and RFC 3339. Input format parsers (timestamp, range validators).

Constants§

CANONICAL_RELATIONS
The 12 well-known relation types, in the ONE spelling this crate stores.
GENERIC_RELATION
The generic relation, named once so consumers stop repeating the literal.

Functions§

is_canonical_relation
Returns true when the relation is one of the 12 canonical types.
map_to_canonical_relation
Maps an arbitrary relation label to its canonical form, never producing a non-canonical value (GAP-SG-48).
normalize_entity_name
Normalizes an entity name to kebab-case ASCII.
normalize_relation
Normalizes a relation string: lowercase + underscores to hyphens.
parse_bool_flexible
Flexible boolean parser for Clap env var integration.
parse_expected_updated_at
Accepts a Unix epoch (integer >= 0) or RFC 3339 timestamp and returns the Unix epoch.
parse_hops_range_u32
Validates --max-hops and --depth where the argument is a u32.
parse_hops_range_usize
Validates --max-hops and --depth where the argument is a usize.
parse_k_range
Validates -k/--k on every retrieval command.
parse_list_limit_range
Validates --limit on the commands that page over stored rows.
parse_quality_sample_range
Validates enrich --quality-sample.
parse_relation
Clap value_parser for --relation: normalizes and validates format.
parse_sub_queries_range
Validates deep-research --max-sub-queries.
validate_relation_format
Validates that a NORMALIZED relation matches ^[a-z][a-z0-9-]*$.
warn_if_non_canonical
Emits a tracing::warn! when the relation is not in CANONICAL_RELATIONS.