Adding large folders

This commit is contained in:
2026-02-26 12:00:21 -05:00
parent 5400d82acd
commit 49701c85ad
47332 changed files with 1942573 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A set of extensions which correspond to preferences."><title>icu_locale_core::preferences::extensions - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="icu_locale_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module extensions</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../icu_locale_core/index.html">icu_<wbr>locale_<wbr>core</a><span class="version">2.1.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module extensions</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#syntactic-vs-semantic-extension-handling" title="Syntactic vs Semantic Extension Handling">Syntactic vs Semantic Extension Handling</a></li></ul><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In icu_<wbr>locale_<wbr>core::<wbr>preferences</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">icu_locale_core</a>::<wbr><a href="../index.html">preferences</a></div><h1>Module <span>extensions</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/icu_locale_core/preferences/extensions/mod.rs.html#5-23">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A set of extensions which correspond to preferences.</p>
<p>The module provides structures that represent known values for each keyword
in Locale <a href="../../extensions/index.html" title="mod icu_locale_core::extensions"><code>extensions</code></a> with semantic meaning.</p>
<h2 id="syntactic-vs-semantic-extension-handling"><a class="doc-anchor" href="#syntactic-vs-semantic-extension-handling">§</a>Syntactic vs Semantic Extension Handling</h2>
<p>This module ensures that only valid, recognized values are used, providing semantic validation.
It would reject invalid values such as <code>-u-hc-BB</code> because <code>BB</code> is not a known hour cycle. This
is ideal for applications that require strict adherence to standardized values and need to
prevent invalid or unrecognized data.</p>
<p>If you need to construct syntactically valid Locale extensions without semantic validation,
allowing any valid key-value pair regardless of recognition, consider using the
<a href="../../extensions/index.html" title="mod icu_locale_core::extensions"><code>crate::extensions</code></a> module.</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="unicode/index.html" title="mod icu_locale_core::preferences::extensions::unicode">unicode</a></dt><dd>A set of unicode extensions which correspond to preferences.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"mod":["unicode"]};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Errors related to parsing of Preferences."><title>icu_locale_core::preferences::extensions::unicode::errors - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../../../" data-static-root-path="../../../../../static.files/" data-current-crate="icu_locale_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module errors</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../icu_locale_core/index.html">icu_<wbr>locale_<wbr>core</a><span class="version">2.1.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module errors</a></h2><h3><a href="#enums">Module Items</a></h3><ul class="block"><li><a href="#enums" title="Enums">Enums</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In icu_<wbr>locale_<wbr>core::<wbr>preferences::<wbr>extensions::<wbr>unicode</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../index.html">icu_locale_core</a>::<wbr><a href="../../../index.html">preferences</a>::<wbr><a href="../../index.html">extensions</a>::<wbr><a href="../index.html">unicode</a></div><h1>Module <span>errors</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../../src/icu_locale_core/preferences/extensions/unicode/errors.rs.html#5-15">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Errors related to parsing of Preferences.</p>
</div></details><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.PreferencesParseError.html" title="enum icu_locale_core::preferences::extensions::unicode::errors::PreferencesParseError">Preferences<wbr>Parse<wbr>Error</a></dt><dd>Error returned by parsers of unicode extensions as preferences.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"enum":["PreferencesParseError"]};

View File

@@ -0,0 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A set of unicode extensions which correspond to preferences."><title>icu_locale_core::preferences::extensions::unicode - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="icu_locale_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module unicode</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../icu_locale_core/index.html">icu_<wbr>locale_<wbr>core</a><span class="version">2.1.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module unicode</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#macros" title="Macros">Macros</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In icu_<wbr>locale_<wbr>core::<wbr>preferences::<wbr>extensions</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">icu_locale_core</a>::<wbr><a href="../../index.html">preferences</a>::<wbr><a href="../index.html">extensions</a></div><h1>Module <span>unicode</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/icu_locale_core/preferences/extensions/unicode/mod.rs.html#5-17">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A set of unicode extensions which correspond to preferences.</p>
<p>The module contains a set structs corresponding to Locale <a href="../../../extensions/unicode/index.html" title="mod icu_locale_core::extensions::unicode"><code>unicode</code></a>
extensions for which ICU4X provides implementations of preferences.</p>
<p>The macros in this module provide wrappers for creating preferences based on enums and structs.</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="errors/index.html" title="mod icu_locale_core::preferences::extensions::unicode::errors">errors</a></dt><dd>Errors related to parsing of Preferences.</dd><dt><a class="mod" href="keywords/index.html" title="mod icu_locale_core::preferences::extensions::unicode::keywords">keywords</a></dt><dd>A list of Preferences derived from Locale unicode extension keywords.</dd></dl><h2 id="macros" class="section-header">Macros<a href="#macros" class="anchor">§</a></h2><dl class="item-table"><dt><a class="macro" href="macro.enum_keyword.html" title="macro icu_locale_core::preferences::extensions::unicode::enum_keyword">enum_<wbr>keyword</a></dt><dd>Macro used to generate a preference keyword as an enum.</dd><dt><a class="macro" href="macro.struct_keyword.html" title="macro icu_locale_core::preferences::extensions::unicode::struct_keyword">struct_<wbr>keyword</a></dt><dd>Macro used to generate a preference keyword as a struct.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CalendarAlgorithm.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CalendarAlgorithm.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CalendarAlgorithm.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CalendarAlgorithm.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.HijriCalendarAlgorithm.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.HijriCalendarAlgorithm.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.HijriCalendarAlgorithm.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.HijriCalendarAlgorithm.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CollationCaseFirst.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CollationCaseFirst.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CollationCaseFirst.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CollationCaseFirst.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CollationNumericOrdering.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CollationNumericOrdering.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CollationNumericOrdering.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CollationNumericOrdering.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CollationType.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CollationType.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CollationType.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CollationType.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.CurrencyType.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.CurrencyType.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.CurrencyType.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.CurrencyType.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CurrencyFormatStyle.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CurrencyFormatStyle.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CurrencyFormatStyle.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CurrencyFormatStyle.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.EmojiPresentationStyle.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.EmojiPresentationStyle.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.EmojiPresentationStyle.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.EmojiPresentationStyle.html" + location.search + location.hash);</script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.FirstDay.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.FirstDay.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.FirstDay.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.FirstDay.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.HourCycle.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.HourCycle.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.HourCycle.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.HourCycle.html" + location.search + location.hash);</script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.LineBreakStyle.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.LineBreakStyle.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.LineBreakStyle.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.LineBreakStyle.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.LineBreakWordHandling.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.LineBreakWordHandling.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.LineBreakWordHandling.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.LineBreakWordHandling.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.MeasurementSystem.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.MeasurementSystem.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.MeasurementSystem.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.MeasurementSystem.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.MeasurementUnitOverride.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.MeasurementUnitOverride.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.MeasurementUnitOverride.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.MeasurementUnitOverride.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.NumberingSystem.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.NumberingSystem.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.NumberingSystem.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.NumberingSystem.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.RegionOverride.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.RegionOverride.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.RegionOverride.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.RegionOverride.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.RegionalSubdivision.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.RegionalSubdivision.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.RegionalSubdivision.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.RegionalSubdivision.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.SentenceBreakSupressions.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.SentenceBreakSupressions.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.SentenceBreakSupressions.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.SentenceBreakSupressions.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"enum":["CalendarAlgorithm","CollationCaseFirst","CollationNumericOrdering","CollationType","CommonVariantType","CurrencyFormatStyle","EmojiPresentationStyle","FirstDay","HijriCalendarAlgorithm","HourCycle","LineBreakStyle","LineBreakWordHandling","MeasurementSystem","MeasurementUnitOverride","SentenceBreakSupressions"],"struct":["CurrencyType","NumberingSystem","RegionOverride","RegionalSubdivision","TimeZoneShortId"]};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.TimeZoneShortId.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.TimeZoneShortId.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.TimeZoneShortId.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/struct.TimeZoneShortId.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CommonVariantType.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CommonVariantType.html">../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CommonVariantType.html</a>...</p>
<script>location.replace("../../../../../../icu_locale_core/preferences/extensions/unicode/keywords/enum.CommonVariantType.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=macro.enum_keyword.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="macro.enum_keyword.html">macro.enum_keyword.html</a>...</p>
<script>location.replace("macro.enum_keyword.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,49 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Macro used to generate a preference keyword as an enum."><title>enum_keyword in icu_locale_core::preferences::extensions::unicode - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="icu_locale_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc macro"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">enum_keyword</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../icu_locale_core/index.html">icu_<wbr>locale_<wbr>core</a><span class="version">2.1.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">enum_<wbr>keyword</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In icu_<wbr>locale_<wbr>core::<wbr>preferences::<wbr>extensions::<wbr>unicode</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">icu_locale_core</a>::<wbr><a href="../../index.html">preferences</a>::<wbr><a href="../index.html">extensions</a>::<wbr><a href="index.html">unicode</a></div><h1>Macro <span class="macro">enum_<wbr>keyword</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/icu_locale_core/preferences/extensions/unicode/macros/enum_keyword.rs.html#53-214">Source</a> </span></div><pre class="rust item-decl"><code>macro_rules! enum_keyword {
(
$(#[$doc:meta])*
$([$derive_attrs:ty])?
$name:ident {
$(
$(#[$variant_doc:meta])*
$([$variant_attr:ty])?
$variant:ident $($v2:ident)?
),*
}
) =&gt; { ... };
($(#[$doc:meta])*
$([$derive_attrs:ty])?
$name:ident {
$(
$(#[$variant_doc:meta])*
$([$variant_attr:ty])?
($key:expr =&gt; $variant:ident $(($v2:ident) {
$(
($subk:expr =&gt; $subv:ident)
),*
})?)
),* $(,)?
},
$ext_key:literal
$(, $input:ident, $aliases:stmt)?
) =&gt; { ... };
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Macro used to generate a preference keyword as an enum.</p>
<p>The macro supports single and two subtag enums.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>icu::locale::preferences::extensions::unicode::enum_keyword;
<span class="macro">enum_keyword!</span>(
EmojiPresentationStyle {
(<span class="string">"emoji" </span>=&gt; Emoji),
(<span class="string">"text" </span>=&gt; Text),
(<span class="string">"default" </span>=&gt; Default)
}, <span class="string">"em"</span>);
<span class="macro">enum_keyword!</span>(
MetaKeyword {
(<span class="string">"normal" </span>=&gt; Normal),
(<span class="string">"emoji" </span>=&gt; Emoji(EmojiPresentationStyle) {
(<span class="string">"emoji" </span>=&gt; Emoji),
(<span class="string">"text" </span>=&gt; Text),
(<span class="string">"default" </span>=&gt; Default)
})
}, <span class="string">"mk"</span>);</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=macro.struct_keyword.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="macro.struct_keyword.html">macro.struct_keyword.html</a>...</p>
<script>location.replace("macro.struct_keyword.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,21 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Macro used to generate a preference keyword as a struct."><title>struct_keyword in icu_locale_core::preferences::extensions::unicode - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="icu_locale_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc macro"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">struct_keyword</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../icu_locale_core/index.html">icu_<wbr>locale_<wbr>core</a><span class="version">2.1.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">struct_<wbr>keyword</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In icu_<wbr>locale_<wbr>core::<wbr>preferences::<wbr>extensions::<wbr>unicode</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">icu_locale_core</a>::<wbr><a href="../../index.html">preferences</a>::<wbr><a href="../index.html">extensions</a>::<wbr><a href="index.html">unicode</a></div><h1>Macro <span class="macro">struct_<wbr>keyword</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/icu_locale_core/preferences/extensions/unicode/macros/struct_keyword.rs.html#30-86">Source</a> </span></div><pre class="rust item-decl"><code>macro_rules! struct_keyword {
($(#[$doc:meta])* $([$derive_attrs:ty])? $name:ident, $ext_key:literal, $value:ty, $try_from:expr, $into:expr) =&gt; { ... };
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Macro used to generate a preference keyword as a struct.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>icu::locale::{
extensions::unicode::{Key, Value},
preferences::extensions::unicode::struct_keyword,
};
<span class="macro">struct_keyword!</span>(
CurrencyType,
<span class="string">"cu"</span>,
String,
|input: Value| { <span class="prelude-val">Ok</span>(<span class="self">Self</span>(input.to_string())) },
|input: CurrencyType| {
icu::locale::extensions::unicode::Value::try_from_str(
input.<span class="number">0</span>.as_str(),
)
.unwrap()
}
);</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"macro":["enum_keyword","struct_keyword"],"mod":["errors","keywords"]};

View File

@@ -0,0 +1,138 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="This API provides necessary functionality for building user preferences structs."><title>icu_locale_core::preferences - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="icu_locale_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module preferences</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../icu_locale_core/index.html">icu_<wbr>locale_<wbr>core</a><span class="version">2.1.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module preferences</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#preferences-vs-options" title="Preferences vs Options">Preferences vs Options</a></li><li><a href="#options-division" title="Options Division">Options Division</a></li><li><a href="#preferences-merging" title="Preferences Merging">Preferences Merging</a></li><li><a href="#ecma-402-vs-icu4x" title="ECMA-402 vs ICU4X">ECMA-402 vs ICU4X</a><ul><li><a href="#ecma-402" title="ECMA-402">ECMA-402</a></li><li><a href="#icu4x" title="ICU4X">ICU4X</a></li></ul></li><li><a href="#examples" title="Examples">Examples</a><ul><li><a href="#scenario-1-use-locale-as-the-only-input" title="Scenario 1: Use Locale as the only input">Scenario 1: Use Locale as the only input</a></li><li><a href="#scenario-2-compose-preferences-and-locale" title="Scenario 2: Compose Preferences and Locale">Scenario 2: Compose Preferences and Locale</a></li><li><a href="#scenario-3-merge-preferences-from-locale-os-and-application" title="Scenario 3: Merge Preferences from Locale, OS, and Application">Scenario 3: Merge Preferences from Locale, OS, and Application</a></li><li><a href="#scenario-4-neither-application-nor-os-specify-the-preference" title="Scenario 4: Neither Application nor OS specify the preference">Scenario 4: Neither Application nor OS specify the preference</a></li></ul></li></ul><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#macros" title="Macros">Macros</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate icu_<wbr>locale_<wbr>core</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">icu_locale_core</a></div><h1>Module <span>preferences</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/icu_locale_core/preferences/mod.rs.html#5-634">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This API provides necessary functionality for building user preferences structs.</p>
<p>It includes the ability to merge information between the struct and a <a href="../struct.Locale.html" title="struct icu_locale_core::Locale"><code>Locale</code></a>,
facilitating the resolution of attributes against default values.</p>
<p>Preferences struct serve as a composable argument to <code>ICU4X</code> constructors, allowing
for ergonomic merging between information encoded in multiple sets of user inputs:
Locale, application preferences and operating system preferences.</p>
<p>The crate is intended primarily to be used by components constructors to normalize the format
of ingesting preferences across all of <code>ICU4X</code>.</p>
<h2 id="preferences-vs-options"><a class="doc-anchor" href="#preferences-vs-options">§</a>Preferences vs Options</h2>
<p>ICU4X introduces a separation between two classes of parameters that are used
to adjust the behavior of a component.</p>
<p><code>Preferences</code> represent the user-driven preferences on how the given user wants the internationalization
to behave. Those are items like language, script, calendar and numbering systems etc.</p>
<p><code>Options</code> represent the developer-driven adjustments that affect how given information is presented
based on the requirements of the application like available space or intended tone.</p>
<h2 id="options-division"><a class="doc-anchor" href="#options-division">§</a>Options Division</h2>
<p>The <code>Options</code> themselves are also divided into options that are affecting data slicing, and ones that dont.
This is necessary to allow for DCE and FFI to produce minimal outputs avoiding loading unnecessary data that
is never to be used by a given component.
The result is that some option keys affect specialized constructors such as <code>try_new_short</code>, <code>try_new_long</code>, which
result in data provider loading only data necessary to format short or long values respectively.
For options that are not affecting data slicing, an <code>Options</code> struct is provided that the developer
can fill with selected key values, or use the defaults.</p>
<h2 id="preferences-merging"><a class="doc-anchor" href="#preferences-merging">§</a>Preferences Merging</h2>
<p>In traditional internationalization APIs, the argument passed to constructors is a locale.
ICU4X changes this paradigm by accepting a <code>Preferences</code>, which can be extracted from a <a href="../struct.Locale.html" title="struct icu_locale_core::Locale"><code>Locale</code></a> and combined with
other <code>Preferences</code>s provided by the environment.</p>
<p>This approach makes it easy for developers to write code that takes just a locale, as in other systems,
as well as handle more sophisticated cases where the application may receive, for example, a locale,
a set of internationalization preferences specified within the application,
and a third set extracted from the operating systems preferences.</p>
<h2 id="ecma-402-vs-icu4x"><a class="doc-anchor" href="#ecma-402-vs-icu4x">§</a>ECMA-402 vs ICU4X</h2>
<p>The result of the two paradigm shifts presented above is that the way constructors work is different.</p>
<h3 id="ecma-402"><a class="doc-anchor" href="#ecma-402">§</a>ECMA-402</h3>
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested"></a><pre class="rust rust-example-rendered"><code><span class="kw">let </span>locale = new Locale(<span class="string">"en-US-u-hc-h12"</span>);
<span class="kw">let </span>options = {
hourCycle: <span class="string">"h24"</span>, <span class="comment">// user preference
</span>timeStyle: <span class="string">"long"</span>, <span class="comment">// developer option
</span>};
<span class="kw">let </span>dtf = new DateTimeFormat(locale, options);</code></pre></div><h3 id="icu4x"><a class="doc-anchor" href="#icu4x">§</a>ICU4X</h3>
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested"></a><pre class="rust rust-example-rendered"><code><span class="kw">let </span>loc = <span class="macro">locale!</span>(<span class="string">"en-US-u-hc-h12"</span>);
<span class="kw">let </span>prefs = DateTimeFormatterPreferences {
hour_cycle: HourCycle::H23,
};
<span class="kw">let </span>options = DateTimeFormatterOptions {
time_style: TimeStyle::Long,
};
<span class="kw">let </span><span class="kw-2">mut </span>combined_prefs = DateTimeFormatterPreferences::from(loc);
combined_prefs.extend(prefs);
<span class="kw">let </span>dtf = DateTimeFormatter::try_new(combined_prefs, options);</code></pre></div>
<p>This architecture allows for flexible composition of user and developer settings
sourced from different locations in custom ways based on the needs of each deployment.</p>
<p>Below are some examples of how the <code>Preferences</code> model can be used in different setups.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>icu::locale::preferences::{
define_preferences,
extensions::unicode::keywords::HourCycle,
};
<span class="kw">use </span>icu::locale::locale;
<span class="macro">define_preferences!</span>(
<span class="doccomment">/// Name of the preferences struct
</span>[Copy]
ExampleComponentPreferences,
{
<span class="doccomment">/// A preference relevant to the component
</span>hour_cycle: HourCycle
}
);
<span class="kw">pub struct </span>ExampleComponent {
data: MyData,
}
<span class="kw">impl </span>ExampleComponent {
<span class="kw">pub fn </span>new(prefs: ExampleComponentPreferences) -&gt; <span class="self">Self </span>{
<span class="kw">let </span>locale = get_data_locale_from_prefs(prefs);
<span class="kw">let </span>data = load_data(locale);
<span class="self">Self </span>{ data }
}
}</code></pre></div>
<p>Now we can use that component in multiple different ways,</p>
<h3 id="scenario-1-use-locale-as-the-only-input"><a class="doc-anchor" href="#scenario-1-use-locale-as-the-only-input">§</a>Scenario 1: Use Locale as the only input</h3>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>loc = <span class="macro">locale!</span>(<span class="string">"en-US-u-hc-h23"</span>);
<span class="kw">let </span>tf = ExampleComponent::new(loc.into());</code></pre></div><h3 id="scenario-2-compose-preferences-and-locale"><a class="doc-anchor" href="#scenario-2-compose-preferences-and-locale">§</a>Scenario 2: Compose Preferences and Locale</h3>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>loc = <span class="macro">locale!</span>(<span class="string">"en-US-u-hc-h23"</span>);
<span class="kw">let </span>app_prefs = ExampleComponentPreferences {
hour_cycle: <span class="prelude-val">Some</span>(HourCycle::H12),
..Default::default()
};
<span class="kw">let </span><span class="kw-2">mut </span>combined_prefs = ExampleComponentPreferences::from(loc);
combined_prefs.extend(app_prefs);
<span class="comment">// HourCycle is set from the prefs bag and override the value from the locale
</span><span class="macro">assert_eq!</span>(combined_prefs.hour_cycle, <span class="prelude-val">Some</span>(HourCycle::H12));
<span class="kw">let </span>tf = ExampleComponent::new(combined_prefs);</code></pre></div><h3 id="scenario-3-merge-preferences-from-locale-os-and-application"><a class="doc-anchor" href="#scenario-3-merge-preferences-from-locale-os-and-application">§</a>Scenario 3: Merge Preferences from Locale, OS, and Application</h3>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>loc = <span class="macro">locale!</span>(<span class="string">"en-US"</span>);
<span class="comment">// Simulate OS preferences
</span><span class="kw">let </span>os_prefs = ExampleComponentPreferences {
hour_cycle: <span class="prelude-val">Some</span>(HourCycle::H23),
..Default::default()
};
<span class="comment">// Application does not specify hour_cycle
</span><span class="kw">let </span>app_prefs = ExampleComponentPreferences {
hour_cycle: <span class="prelude-val">None</span>,
..Default::default()
};
<span class="kw">let </span><span class="kw-2">mut </span>combined_prefs = ExampleComponentPreferences::from(loc);
combined_prefs.extend(os_prefs);
combined_prefs.extend(app_prefs);
<span class="comment">// HourCycle is set from the OS preferences since the application didn't specify it
</span><span class="macro">assert_eq!</span>(combined_prefs.hour_cycle, <span class="prelude-val">Some</span>(HourCycle::H23));
<span class="kw">let </span>tf = ExampleComponent::new(combined_prefs);</code></pre></div><h3 id="scenario-4-neither-application-nor-os-specify-the-preference"><a class="doc-anchor" href="#scenario-4-neither-application-nor-os-specify-the-preference">§</a>Scenario 4: Neither Application nor OS specify the preference</h3>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>loc = <span class="macro">locale!</span>(<span class="string">"en-US-u-hc-h23"</span>);
<span class="comment">// Simulate OS preferences
</span><span class="kw">let </span>os_prefs = ExampleComponentPreferences::default(); <span class="comment">// OS does not specify hour_cycle
</span><span class="kw">let </span>app_prefs = ExampleComponentPreferences::default(); <span class="comment">// Application does not specify hour_cycle
</span><span class="kw">let </span><span class="kw-2">mut </span>combined_prefs = ExampleComponentPreferences::from(loc);
combined_prefs.extend(os_prefs);
combined_prefs.extend(app_prefs);
<span class="comment">// HourCycle is taken from the locale
</span><span class="macro">assert_eq!</span>(combined_prefs.hour_cycle, <span class="prelude-val">Some</span>(HourCycle::H23));
<span class="kw">let </span>tf = ExampleComponent::new(combined_prefs);</code></pre></div></div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="extensions/index.html" title="mod icu_locale_core::preferences::extensions">extensions</a></dt><dd>A set of extensions which correspond to preferences.</dd></dl><h2 id="macros" class="section-header">Macros<a href="#macros" class="anchor">§</a></h2><dl class="item-table"><dt><a class="macro" href="macro.define_preferences.html" title="macro icu_locale_core::preferences::define_preferences">define_<wbr>preferences</a></dt><dd>A macro to facilitate generation of preferences struct.</dd><dt><a class="macro" href="macro.prefs_convert.html" title="macro icu_locale_core::preferences::prefs_convert">prefs_<wbr>convert</a></dt></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.LocalePreferences.html" title="struct icu_locale_core::preferences::LocalePreferences">Locale<wbr>Preferences</a></dt><dd>The structure storing locale subtags used in preferences.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.PreferenceKey.html" title="trait icu_locale_core::preferences::PreferenceKey">Preference<wbr>Key</a></dt><dd>A low-level trait implemented on each preference exposed in component preferences.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../icu_locale_core/preferences/struct.LocalePreferences.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../icu_locale_core/preferences/struct.LocalePreferences.html">../../../icu_locale_core/preferences/struct.LocalePreferences.html</a>...</p>
<script>location.replace("../../../icu_locale_core/preferences/struct.LocalePreferences.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=macro.define_preferences.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="macro.define_preferences.html">macro.define_preferences.html</a>...</p>
<script>location.replace("macro.define_preferences.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,46 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A macro to facilitate generation of preferences struct."><title>define_preferences in icu_locale_core::preferences - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="icu_locale_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc macro"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">define_preferences</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../icu_locale_core/index.html">icu_<wbr>locale_<wbr>core</a><span class="version">2.1.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">define_<wbr>preferences</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In icu_<wbr>locale_<wbr>core::<wbr>preferences</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">icu_locale_core</a>::<wbr><a href="index.html">preferences</a></div><h1>Macro <span class="macro">define_<wbr>preferences</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/icu_locale_core/preferences/mod.rs.html#464-591">Source</a> </span></div><pre class="rust item-decl"><code>macro_rules! define_preferences {
(
$(#[$doc:meta])*
$([$derive_attrs:ty])?
$name:ident,
{
$(
$(#[$key_doc:meta])*
$key:ident: $pref:ty
),*
}
) =&gt; { ... };
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A macro to facilitate generation of preferences struct.</p>
<p>The generated preferences struct provides methods for merging and converting between <a href="../struct.Locale.html" title="struct icu_locale_core::Locale"><code>Locale</code></a> and
the preference bag. See <a href="index.html" title="mod icu_locale_core::preferences"><code>preferences</code></a> for use cases.</p>
<p>In the example below, the input argument is the generated preferences struct which
can be auto-converted from a Locale, or combined from a Locale and Preferences Bag.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>icu::locale::{
preferences::{
define_preferences,
extensions::unicode::keywords::HourCycle
},
locale,
};
<span class="macro">define_preferences!</span>(
[Copy]
NoCalendarFormatterPreferences,
{
hour_cycle: HourCycle
}
);
<span class="kw">struct </span>NoCalendarFormatter {}
<span class="kw">impl </span>NoCalendarFormatter {
<span class="kw">pub fn </span>try_new(prefs: NoCalendarFormatterPreferences) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>, ()&gt; {
<span class="comment">// load data and set struct fields based on the prefs input
</span><span class="prelude-val">Ok</span>(<span class="self">Self </span>{})
}
}
<span class="kw">let </span>loc = <span class="macro">locale!</span>(<span class="string">"en-US"</span>);
<span class="kw">let </span>tf = NoCalendarFormatter::try_new(loc.into());</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=macro.prefs_convert.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="macro.prefs_convert.html">macro.prefs_convert.html</a>...</p>
<script>location.replace("macro.prefs_convert.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `prefs_convert` macro in crate `icu_locale_core`."><title>prefs_convert in icu_locale_core::preferences - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="icu_locale_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc macro"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">prefs_convert</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../icu_locale_core/index.html">icu_<wbr>locale_<wbr>core</a><span class="version">2.1.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In icu_<wbr>locale_<wbr>core::<wbr>preferences</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">icu_locale_core</a>::<wbr><a href="index.html">preferences</a></div><h1>Macro <span class="macro">prefs_<wbr>convert</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/icu_locale_core/preferences/mod.rs.html#595-628">Source</a> </span></div><pre class="rust item-decl"><code>macro_rules! prefs_convert {
(
$name1:ident,
$name2:ident
) =&gt; { ... };
(
$name1:ident,
$name2:ident,
{
$(
$key:ident
),*
}
) =&gt; { ... };
}</code></pre></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"macro":["define_preferences","prefs_convert"],"mod":["extensions"],"struct":["LocalePreferences"],"trait":["PreferenceKey"]};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long