Macro icu_locid::extensions::unicode::value

source ·
macro_rules! value {
    ($value:literal) => { ... };
}
Expand description

A macro allowing for compile-time construction of valid Unicode Value subtag.

The macro only supports single-subtag values.

§Examples

use icu::locid::extensions::unicode::{key, value};
use icu::locid::Locale;

let loc: Locale = "de-u-ca-buddhist".parse().unwrap();

assert_eq!(
    loc.extensions.unicode.keywords.get(&key!("ca")),
    Some(&value!("buddhist"))
);