Skip to main content

parse_object_key

Function parse_object_key 

Source
pub fn parse_object_key(text: &str) -> Result<ObjectKey>
Expand description

Parses a key encoding (16.5): class-name "(" [ key-pair *( "," key-pair ) ] ")", names strictly ascending, no space, strings quoted with " doubled, a class-typed key its own encoding unquoted. Anything that is not exactly the canonical encoding of what it decodes to (a bare class name, an unquoted string, a space, trailing text, unsorted or repeated names, a number not in canonical form) is E_KEY_ENCODING.

Since spec-0.5.0 (16.5) an encoding is one string value: as a whole it is at most 1024 bytes, holds no control character, is in NFC and is assigned in Unicode 15.1; that bounds each string inside it too. Every failure of these checks is E_KEY_ENCODING as well.