Module icu_locid::extensions::private
source · Expand description
Private Use Extensions is a list of extensions intended for private use.
Those extensions are treated as a pass-through, and no Unicode related behavior depends on them.
The main struct for this extension is Private
which is a list of Subtag
s.
§Examples
use icu::locid::extensions::private::subtag;
use icu::locid::{locale, Locale};
let mut loc: Locale = "en-US-x-foo-faa".parse().expect("Parsing failed.");
assert!(loc.extensions.private.contains(&subtag!("foo")));
assert_eq!(loc.extensions.private.iter().next(), Some(&subtag!("foo")));
loc.extensions.private.clear();
assert!(loc.extensions.private.is_empty());
assert_eq!(loc, locale!("en-US"));
Macros§
- A macro allowing for compile-time construction of valid
Subtag
subtags.
Structs§
- A list of
Private Use Extensions
as defined inUnicode Locale Identifier
specification. - A single item used in a list of
Private
extensions.