Module icu_locale::extensions::unicode
Expand description
Unicode Extensions provide information about user preferences in a given locale.
The main struct for this extension is Unicode
which contains Keywords
and
Attributes
.
§Examples
use icu::locale::extensions::unicode::{attribute, key, value, Unicode};
use icu::locale::Locale;
let loc: Locale = "en-US-u-foobar-hc-h12".parse().expect("Parsing failed.");
assert_eq!(
loc.extensions.unicode.keywords.get(&key!("hc")),
Some(&value!("h12"))
);
assert!(loc
.extensions
.unicode
.attributes
.contains(&attribute!("foobar")));
Structs§
- An attribute used in a set of
Attributes
. - A set of
Attribute
elements as defined inUnicode Extension Attributes
. - A key used in a list of
Keywords
. - A Subivision Id as defined in
Unicode Locale Identifier
. - A subdivision suffix used in
SubdivisionId
. - Unicode Extensions provide information about user preferences in a given locale.
- A value used in a list of
Keywords
.