icu_locale_core/preferences/extensions/
mod.rs

1// This file is part of ICU4X. For terms of use, please see the file
2// called LICENSE at the top level of the ICU4X source tree
3// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
4
5//! A set of extensions which correspond to preferences.
6//!
7//! The module provides structures that represent known values for each keyword
8//! in Locale [`extensions`](crate::extensions) with semantic meaning.
9//!
10//! # Syntactic vs Semantic Extension Handling
11//!
12//! This module ensures that only valid, recognized values are used, providing semantic validation.
13//! It would reject invalid values such as `-u-hc-BB` because `BB` is not a known hour cycle. This
14//! is ideal for applications that require strict adherence to standardized values and need to
15//! prevent invalid or unrecognized data.
16//!
17//! If you need to construct syntactically valid Locale extensions without semantic validation,
18//! allowing any valid key-value pair regardless of recognition, consider using the
19//! [`crate::extensions`] module.
20//!
21//! [`Locale`]: crate::Locale
22
23pub mod unicode;