Macro icu::locid::macros::variant [−][src]
variant!() { /* proc-macro */ }
A macro allowing for compile-time construction of valid Variant
subtag.
The macro will perform syntax canonicalization of the tag.
Examples
use icu::locid::subtags::Variant; use icu::locid::macros::variant; const POSIX: Variant = variant!("Posix"); let posix: Variant = "Posix".parse() .expect("Failed to parse variant subtag."); assert_eq!(POSIX, "posix"); assert_eq!(POSIX, posix);