Crate ucd_trie

Source
Expand description

The ucd-trie crate provides a compressed trie set specifically tailored for Unicode codepoints. The principle use case for such a trie is to represent properties defined by Unicode that correspond to sets of Unicode codepoints. (These properties are formally called boolean properties or “single valued” properties. See UTR#23 S3.3 for more details.)

This crate has two principle types: TrieSetOwned and TrieSetSlice, corresponding to a similar split as there is between Vec<T> and &[T]. TrieSetOwned is the only way to construct a trie from a set of Unicode codepoints.

The intended use of this library is to embed a static instance of TrieSetSlice into your source code, and then use its methods as defined in this crate to test membership. (The ucd-generate tool can likely generate this code for you.)

Finally, while this crate uses the standard library by default, it provides no_std functionality by disabling the std feature. When no_std is enabled, then TrieSetOwned is not provided. Instead, only TrieSetSlice is provided, which means no_std crates can still embed tries into their code.

Structs§

Enums§

  • An error that can occur during construction of a trie.

Type Aliases§

  • A type alias that maps to std::result::Result<T, ucd_trie::Error>.
  • A type alias for TrieSetSlice<'static>.