Module id

Module id 

Source
Expand description

Endpoint-id charset contract — the addressable-name validator.

Every addressable endpoint id/name is restricted to a deliberately narrow charset so that:

  • : and @ stay reserved as the future address delimiters of the canonical qualified form [subnet:]id[@node] (ADR-0006 / REQ-INST-10) — no bare id can ever contain them, so qualified-address parsing is unambiguous and no permissive id-data accumulates that would need a later migration;
  • path separators, whitespace, and control characters cannot smuggle into a perch directory name or a wire target string.

Allowed: ASCII alphanumeric, -, _, and the Japanese script blocks (Hiragana, Katakana, CJK Unified Ideographs). Nothing else. The existing Psyche (<parent>-psyche) and Worker (<parent>-w<N>) suffix scheme uses only - + alphanumerics, so composite ids validate cleanly.

Enums§

IdError
Why an endpoint id was rejected.

Constants§

MAX_ENDPOINT_ID_LEN
Maximum endpoint-id length, in Unicode scalar values.

Functions§

is_allowed_id_char
True if c is permitted in an endpoint id.
is_valid_endpoint_id
Convenience boolean form of validate_endpoint_id.
validate_endpoint_id
Validate an addressable endpoint id/name against the charset contract. Returns Ok(()) if every scalar is allowed and the length is in 1..=MAX.