macro_rules! extensions_transform_key {
    ($key:literal) => { ... };
}
Expand description

A macro allowing for compile-time construction of valid Transform Key subtag.

The macro will perform syntax canonicalization of the tag.

Examples

use icu::locid::extensions::transform::{Key, Value};
use icu::locid::extensions_transform_key as key;
use icu::locid::Locale;

const HYBRID_KEY: Key = key!("h0");

let loc: Locale = "hi-t-en-h0-hybrid".parse().unwrap();

assert_eq!(
    loc.extensions.transform.fields.get(&HYBRID_KEY),
    Some(&Value::from_bytes(b"hybrid").unwrap())
);