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

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

The macro will perform syntax canonicalization of the tag.

Examples

use icu::locid::{variant, subtags::Variant};

const POSIX: Variant = variant!("Posix");

let posix: Variant = "Posix".parse().unwrap();

assert_eq!(POSIX, "posix");
assert_eq!(POSIX, posix);