macro_rules! subtags_language {
    ($string:literal) => { ... };
}
Expand description

A macro allowing for compile-time construction of valid Language subtags.

Examples

Parsing errors don’t have to be handled at runtime:

assert_eq!(
  icu_locid::subtags_language!("en"),
  "en".parse::<icu_locid::subtags :: Language>().unwrap()
);

Invalid input is a compile failure:

icu_locid::subtags_language!("419");

Language: crate::subtags :: Language