pub struct SmallCodePointTrie<'trie, T: TrieValue> { /* private fields */ }Expand description
Type-safe wrapper for a small trie guaranteeing the the getters don’t branch on the trie type.
Trait Implementations§
Source§impl<'trie, T: TrieValue> TryFrom<&'trie CodePointTrie<'trie, T>> for &'trie SmallCodePointTrie<'trie, T>
impl<'trie, T: TrieValue> TryFrom<&'trie CodePointTrie<'trie, T>> for &'trie SmallCodePointTrie<'trie, T>
Source§fn try_from(
reference: &'trie CodePointTrie<'trie, T>,
) -> Result<&'trie SmallCodePointTrie<'trie, T>, TypedCodePointTrieError>
fn try_from( reference: &'trie CodePointTrie<'trie, T>, ) -> Result<&'trie SmallCodePointTrie<'trie, T>, TypedCodePointTrieError>
Performs the conversion.
Source§impl<'trie, T: TrieValue> TryFrom<CodePointTrie<'trie, T>> for SmallCodePointTrie<'trie, T>
impl<'trie, T: TrieValue> TryFrom<CodePointTrie<'trie, T>> for SmallCodePointTrie<'trie, T>
Source§fn try_from(
value: CodePointTrie<'trie, T>,
) -> Result<SmallCodePointTrie<'trie, T>, TypedCodePointTrieError>
fn try_from( value: CodePointTrie<'trie, T>, ) -> Result<SmallCodePointTrie<'trie, T>, TypedCodePointTrieError>
Performs the conversion.
Source§impl<'trie, T: TrieValue> TypedCodePointTrie<'trie, T> for SmallCodePointTrie<'trie, T>
impl<'trie, T: TrieValue> TypedCodePointTrie<'trie, T> for SmallCodePointTrie<'trie, T>
Source§fn as_untyped_ref(&self) -> &CodePointTrie<'trie, T>
fn as_untyped_ref(&self) -> &CodePointTrie<'trie, T>
Returns a reference to the wrapped CodePointTrie.
Source§fn to_untyped(self) -> CodePointTrie<'trie, T>
fn to_untyped(self) -> CodePointTrie<'trie, T>
Extracts the wrapped CodePointTrie.
Source§fn 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.Source§fn 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.
Source§fn 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.
Source§fn get(&self, c: char) -> T
fn get(&self, c: char) -> T
Lookup trie value by Unicode Scalar Value without branching on trie type.
Source§fn 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.
Source§fn 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.Auto Trait Implementations§
impl<'trie, T> Freeze for SmallCodePointTrie<'trie, T>where
T: Freeze,
impl<'trie, T> RefUnwindSafe for SmallCodePointTrie<'trie, T>
impl<'trie, T> Send for SmallCodePointTrie<'trie, T>
impl<'trie, T> Sync for SmallCodePointTrie<'trie, T>
impl<'trie, T> Unpin for SmallCodePointTrie<'trie, T>
impl<'trie, T> UnwindSafe for SmallCodePointTrie<'trie, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more