Enum TrieType
enum TrieType
The type of trie represents whether the trie has an optimization that would make it smaller or faster.
Regarding performance, a trie being a small or fast type affects the number of array lookups
needed for code points in the range [0x1000, 0x10000). In this range, Small tries use 4 array lookups,
while Fast tries use 2 array lookups.
Code points before the interval (in [0, 0x1000)) will always use 2 array lookups.
Code points after the interval (in [0x10000, 0x10FFFF]) will always use 4 array lookups.
Regarding size, Fast type tries are larger than Small type tries because the minimum size of
the index array is larger. The minimum size is the "fast max" limit, which is the limit of the range
of code points with 2 array lookups.
See the document Unicode Properties and Code Point Tries in ICU4X.
Also see UCPTrieType in ICU4C.
Variants
Implementations
impl Clone for TrieType
fn clone(self: &Self) -> TrieType
impl Copy for TrieType
impl Debug for TrieType
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for TrieType
impl Freeze for TrieType
impl PartialEq for TrieType
fn eq(self: &Self, other: &TrieType) -> bool
impl RefUnwindSafe for TrieType
impl Send for TrieType
impl StructuralPartialEq for TrieType
impl Sync for TrieType
impl TryFrom for TrieType
fn try_from(trie_type_int: u8) -> Result<TrieType, Error>
impl Unpin for TrieType
impl UnsafeUnpin for TrieType
impl UnwindSafe for TrieType
impl<T> Any for TrieType
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for TrieType
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for TrieType
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for TrieType
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> ErasedDestructor for TrieType
impl<T> From for TrieType
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for TrieType
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for TrieType
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for TrieType
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for TrieType
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>