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§
- Parsed
Segment - Result of successfully parsing a single GTS segment.
Enums§
- GtsId
Error - 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
u32and 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).