Macro icu::locid::extensions_transform_key
source · [−]macro_rules! extensions_transform_key {
($string:literal) => { ... };
}
Expand description
A macro allowing for compile-time construction of valid Key
subtags.
Examples
Parsing errors don’t have to be handled at runtime:
assert_eq!(
icu_locid::extensions_transform_key!("k0"),
"k0".parse::<icu_locid::extensions :: transform :: Key>().unwrap()
);
Invalid input is a compile failure:
ⓘ
icu_locid::extensions_transform_key!("");
Key
: crate::extensions :: transform :: Key