#[repr(transparent)]pub struct SmallCodePointTrie<'trie, T: TrieValue> {
inner: CodePointTrie<'trie, T>,
}Expand description
Type-safe wrapper for a small trie guaranteeing the the getters don’t branch on the trie type.
Fields§
§inner: CodePointTrie<'trie, T>Trait Implementations§
Source§impl<'trie, T: TrieValue> AbstractCodePointTrie<'trie, T> for SmallCodePointTrie<'trie, T>
impl<'trie, T: TrieValue> AbstractCodePointTrie<'trie, T> for SmallCodePointTrie<'trie, T>
Source§unsafe fn utf8_two_byte(&self, high_five: u32, low_six: u32) -> T
unsafe fn utf8_two_byte(&self, high_five: u32, low_six: u32) -> T
Look up trie value by a two-byte UTF-8 sequence. Read more
Source§unsafe fn utf8_three_byte(&self, high_ten: u32, low_six: u32) -> T
unsafe fn utf8_three_byte(&self, high_ten: u32, low_six: u32) -> T
Look up trie value by a three-byte UTF-8 or WTF-8 sequence. Read more
Source§fn bmp(&self, bmp: u16) -> T
fn bmp(&self, bmp: u16) -> T
Look up trie value by a Basic Multilingual Plane character. Read more
Source§fn supplementary(&self, supplementary: u32) -> T
fn supplementary(&self, supplementary: u32) -> T
Look up trie value by a non-Basic Multilingual Plane character. Read more
Source§fn code_point(&self, code_point: u32) -> T
fn code_point(&self, code_point: u32) -> T
Look up trie value by Unicode Code Point. Read more
Source§impl<'trie, T: Clone + TrieValue> Clone for SmallCodePointTrie<'trie, T>
impl<'trie, T: Clone + TrieValue> Clone for SmallCodePointTrie<'trie, T>
Source§fn clone(&self) -> SmallCodePointTrie<'trie, T>
fn clone(&self) -> SmallCodePointTrie<'trie, T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'trie, T: PartialEq + TrieValue> PartialEq for SmallCodePointTrie<'trie, T>
impl<'trie, T: PartialEq + TrieValue> PartialEq for SmallCodePointTrie<'trie, T>
Source§fn eq(&self, other: &SmallCodePointTrie<'trie, T>) -> bool
fn eq(&self, other: &SmallCodePointTrie<'trie, T>) -> bool
Tests for
self and other values to be equal, and is used by ==.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§type Error = TypedCodePointTrieError
type Error = TypedCodePointTrieError
The type returned in the event of a conversion error.
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§type Error = TypedCodePointTrieError
type Error = TypedCodePointTrieError
The type returned in the event of a conversion error.
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 get8(&self, latin1: u8) -> T
fn get8(&self, latin1: u8) -> T
Lookup trie value by Latin1 Code Point without branching on trie type.
Source§unsafe fn get7(&self, ascii: u8) -> T
unsafe fn get7(&self, ascii: u8) -> T
Lookup trie value by ASCII Code Point without branching on trie type. Read more
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.Source§impl<'yoke, T> Yokeable<'yoke> for SmallCodePointTrie<'static, T>where
T: 'static + TrieValue,
impl<'yoke, T> Yokeable<'yoke> for SmallCodePointTrie<'static, T>where
T: 'static + TrieValue,
Source§type Output = SmallCodePointTrie<'yoke, T>
type Output = SmallCodePointTrie<'yoke, T>
This type MUST be
Self with the 'static replaced with 'a, i.e. Self<'a>Source§fn transform_owned(self) -> Self::Output
fn transform_owned(self) -> Self::Output
Source§impl<'zf, 'zf_inner, T: TrieValue> ZeroFrom<'zf, SmallCodePointTrie<'zf_inner, T>> for SmallCodePointTrie<'zf, T>
impl<'zf, 'zf_inner, T: TrieValue> ZeroFrom<'zf, SmallCodePointTrie<'zf_inner, T>> for SmallCodePointTrie<'zf, T>
Source§fn zero_from(this: &'zf SmallCodePointTrie<'zf_inner, T>) -> Self
fn zero_from(this: &'zf SmallCodePointTrie<'zf_inner, T>) -> Self
Clone the other
C into a struct that may retain references into C.impl<'trie, T: Eq + TrieValue> Eq for SmallCodePointTrie<'trie, T>
impl<'trie, T: TrieValue> Seal for SmallCodePointTrie<'trie, T>
impl<'trie, T: TrieValue> StructuralPartialEq for SmallCodePointTrie<'trie, T>
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> UnsafeUnpin for SmallCodePointTrie<'trie, T>where
T: UnsafeUnpin,
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