Skip to main content

Crate gts_id

Crate gts_id 

Source
Expand description

Shared GTS ID validation and parsing primitives.

This crate provides the single source of truth for GTS identifier validation, used by both the gts runtime library and the gts-macros proc-macro crate.

Structs§

ParsedSegment
Result of successfully parsing a single GTS segment.

Enums§

GtsIdError
Errors from GTS ID validation.

Constants§

GTS_MAX_LENGTH
Maximum allowed length for a GTS identifier string.
GTS_PREFIX
The required prefix for all GTS identifiers.

Functions§

is_uuid
Checks whether a string matches the UUID format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (hex digits and dashes only).
is_valid_segment_token
Validates a GTS segment token without regex.
parse_u32_exact
Parse a u32 and reject leading zeros (except "0" itself).
validate_gts_id
Validate a full GTS identifier string.
validate_segment
Validate and parse a single GTS segment (the part between ~ markers).