Skip to main content

parse_identifier

Function parse_identifier 

Source
pub fn parse_identifier(
    type_name: &'static str,
    text: &str,
) -> Result<Uuid, IdentifierError>
Expand description

Read the one spelling this system accepts, refusing every other.

This is the parse half of the rule every identifier the [identifier!] macro declares applies; it is public so that the macro can reach it from another crate, and is nothing a caller needs by hand.

ยงErrors

Returns IdentifierError naming the type and what is wrong with the string: a spelling other than the lowercase hyphenated one, text that is not a UUID at all, or a UUID at a version other than 7.