struct CharacterAndClassAndTrieValue {
c_and_c: CharacterAndClass,
trie_val: u32,
}
Expand description
This struct makes the handling of the upcoming
buffer
easily so that trie lookups are done at most once. However,
when upcoming[0]
is an undecomposed starter, we don’t
need the ccc yet, and when lookahead has already done the
trie lookups, we don’t need trie_value
, as it is implied
by ccc.
TODO(#2386): This struct carries redundant information, and
upcoming
should be split into a buffer of CharacterAndClass
and an Option<CharacterAndTrieValue>
, but that refactoring
isn’t 100% necessary, so focusing on data format stability
for 1.0.
(Deliberately non-Copy
, because CharacterAndClass
is
non-Copy
.)
Fields§
§c_and_c: CharacterAndClass
§trie_val: u32
Implementations§
source§impl CharacterAndClassAndTrieValue
impl CharacterAndClassAndTrieValue
pub fn new_with_non_decomposing_starter(c: char) -> Self
pub fn new_with_non_zero_ccc(c: char, ccc: CanonicalCombiningClass) -> Self
pub fn new_with_non_special_decomposition_trie_val( c: char, trie_val: u32, ) -> Self
pub fn new_with_trie_val(c: char, trie_val: u32) -> Self
pub fn decomposition_starts_with_non_starter(&self) -> bool
fn character(&self) -> char
fn ccc(&self) -> CanonicalCombiningClass
Trait Implementations§
source§impl Clone for CharacterAndClassAndTrieValue
impl Clone for CharacterAndClassAndTrieValue
source§fn clone(&self) -> CharacterAndClassAndTrieValue
fn clone(&self) -> CharacterAndClassAndTrieValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for CharacterAndClassAndTrieValue
impl RefUnwindSafe for CharacterAndClassAndTrieValue
impl Send for CharacterAndClassAndTrieValue
impl Sync for CharacterAndClassAndTrieValue
impl Unpin for CharacterAndClassAndTrieValue
impl UnwindSafe for CharacterAndClassAndTrieValue
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