Skip to main content

valid_nsid_prefix

Function valid_nsid_prefix 

Source
fn valid_nsid_prefix(prefix: &str) -> bool
Expand description

Is prefix a syntactically valid recursive-prefix wildcard’s prefix?

A prefix names authority segments only — it has no name segment of its own, so it is never itself a complete NSID (didbot_lexicon::nsid_syntax requires one). Pairing it with a synthetic, always-valid name segment before handing it to the real validator exercises every rule about the authority segments themselves (length, character set, hyphen placement, a non-numeric top-level domain) without requiring the prefix to already be a complete NSID.