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