Module codepointtrie
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 / ICU4J CodePointTrie 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.
Examples
Querying a CodePointTrie
use planes;
let trie = get_planes_trie;
assert_eq!; // 'A' as u32
assert_eq!; // 'Ꮰ' as u32
assert_eq!; // '𐁄' as u32
Modules
-
planes
Sample data for
CodePointTriethat returns the code point's plane number.
Structs
- CodePointMapRange Represents a range of consecutive code points sharing the same value in a code point map.
-
CodePointMapRangeIterator
A custom
Iteratortype specifically for a code point trie that returnsCodePointMapRanges. -
CodePointTrie
This struct represents a de-serialized
CodePointTriethat was exported from ICU binary data. -
CodePointTrieHeader
This struct contains the fixed-length header fields of a
CodePointTrie.
Enums
-
CodePointTrieError
A custom error type for
CodePointTrie. - TrieType The type of trie represents whether the trie has an optimization that would make it smaller or faster.
Traits
-
TrieValue
A trait representing the values stored in the data array of a
CodePointTrie. This trait is used as a type parameter in constructing aCodePointTrie.