Name Description Size Coverage
cptrie.rs 118693 -
error.rs Custom error type(s) for the parent module. 2160 -
impl_const.rs 2923 -
iter.rs Iterators by `char` and `TrieValue` or index, `char`, and `TrieValue` over various kinds of slices of text given an `AbstractCodePointTrie`. 55930 -
mod.rs This module provides a data structure for an time-efficient lookup of values associated to code points. It is an implementation of the existing [ICU4C UCPTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/ucptrie_8h.html) / [ICU4J CodePointTrie](https://unicode-org.github.io/icu-docs/apidoc/dev/icu4j/) API. # Architecture ICU4X [`CodePointTrie`] is designed to provide a read-only view of [`CodePointTrie`] data that is exported from ICU4C. Detailed information about the design of the data structure can be found in the documentation for the [`CodePointTrie`] struct. In particular for the [`FastCodePointTrie`] variant, the data layout is designed for it to be efficient to fuse trie querying with UTF-8 or UTF-16 decoding. See the [`iter`] module for iterators that do this. # Examples ## Querying a `CodePointTrie` ``` use icu::collections::codepointtrie::planes; let trie = planes::get_planes_trie(); assert_eq!(0, trie.get32(0x41)); // 'A' as u32 assert_eq!(0, trie.get32(0x13E0)); // 'Ꮰ' as u32 assert_eq!(1, trie.get32(0x10044)); // '𐁄' as u32 ``` [`ICU4X`]: ../icu/index.html 1989 -
planes.rs Sample data for [`CodePointTrie`] that returns the code point's plane number. 24816 -
serde.rs 5088 -
toml.rs Utilities for reading [`CodePointTrie`] data from TOML files. 4422 -