pub trait TypedCodePointTrie<'trie, T: TrieValue>: Seal {
const TRIE_TYPE: TrieType;
// Required methods
fn as_untyped_ref(&self) -> &CodePointTrie<'trie, T>;
fn to_untyped(self) -> CodePointTrie<'trie, T>;
// Provided methods
fn get32_u32(&self, code_point: u32) -> u32 { ... }
fn get16(&self, bmp: u16) -> T { ... }
fn get32_supplementary(&self, supplementary: u32) -> T { ... }
fn get(&self, c: char) -> T { ... }
fn get32(&self, code_point: u32) -> T { ... }
fn get32_by_fast_index(&self, code_point: u32) -> Option<T> { ... }
}Expand description
Trait for writing trait bounds for monomorphizing over either
FastCodePointTrie or SmallCodePointTrie.
Required Associated Constants§
Required Methods§
Sourcefn as_untyped_ref(&self) -> &CodePointTrie<'trie, T>
fn as_untyped_ref(&self) -> &CodePointTrie<'trie, T>
Returns a reference to the wrapped CodePointTrie.
Sourcefn to_untyped(self) -> CodePointTrie<'trie, T>
fn to_untyped(self) -> CodePointTrie<'trie, T>
Extracts the wrapped CodePointTrie.
Provided Methods§
Sourcefn get32_u32(&self, code_point: u32) -> u32
fn get32_u32(&self, code_point: u32) -> u32
Lookup trie value as u32 by Unicode Scalar Value without branching on trie type.
Sourcefn get16(&self, bmp: u16) -> T
fn get16(&self, bmp: u16) -> T
Lookup trie value by Basic Multilingual Plane Code Point without branching on trie type.
Sourcefn get32_supplementary(&self, supplementary: u32) -> T
fn get32_supplementary(&self, supplementary: u32) -> T
Lookup trie value by non-Basic Multilingual Plane Scalar Value without branching on trie type.
Sourcefn get(&self, c: char) -> T
fn get(&self, c: char) -> T
Lookup trie value by Unicode Scalar Value without branching on trie type.
Sourcefn get32(&self, code_point: u32) -> T
fn get32(&self, code_point: u32) -> T
Lookup trie value by Unicode Code Point without branching on trie type.
Sourcefn get32_by_fast_index(&self, code_point: u32) -> Option<T>
fn get32_by_fast_index(&self, code_point: u32) -> Option<T>
Returns the value that is associated with code_point in this CodePointTrie
if code_point uses fast-path lookup or None if code_point
should use small-path lookup or is above the supported range.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.