pub struct CollationSpecialPrimaries<'data> {
pub last_primaries: ZeroVec<'data, u16>,
pub numeric_primary: u8,
}Expand description
Root-associated additional data that doesn’t change in tailorings
These are the fields that logically belong to the root data but don’t belong to the tailoring data and that are on this separate struct, since we have the same struct for a tailoring and the bulk of the root.
As a practical matter, this struct happens to only carry information about what concrete numeric values for primary weights are special in particular ways. In principle, when the root data is built, the root builder is allowed to assign the numeric values as it sees fit, which is why these aren’t hard-coded.
Note: In 2.0.0 and prior, this struct was loaded only if it was known at collator construction time (based on options) that the data here was going to be needed. With the introduction of collation keys and the decision not to introduce a collator key generator object separate from the collator, this struct is now always loaded.
Fields§
§last_primaries: ZeroVec<'data, u16>The primaries corresponding to MaxVariable
character classes packed so that each fits in
16 bits. Length must match the number of enum
variants in MaxVariable, currently 4.
This is potentially followed by 256 bits (packed in 16 u16s) to classify every possible byte into compressible or non-compressible.
numeric_primary: u8The high 8 bits of the numeric primary
Trait Implementations§
Source§impl<'data> Clone for CollationSpecialPrimaries<'data>
impl<'data> Clone for CollationSpecialPrimaries<'data>
Source§fn clone(&self) -> CollationSpecialPrimaries<'data>
fn clone(&self) -> CollationSpecialPrimaries<'data>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'data> Debug for CollationSpecialPrimaries<'data>
impl<'data> Debug for CollationSpecialPrimaries<'data>
Source§impl<'de, 'data> Deserialize<'de> for CollationSpecialPrimaries<'data>where
'de: 'data,
impl<'de, 'data> Deserialize<'de> for CollationSpecialPrimaries<'data>where
'de: 'data,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CollationSpecialPrimaries<'data>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CollationSpecialPrimaries<'data>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl MaybeAsVarULE for CollationSpecialPrimaries<'_>
impl MaybeAsVarULE for CollationSpecialPrimaries<'_>
Source§impl<'data> PartialEq for CollationSpecialPrimaries<'data>
impl<'data> PartialEq for CollationSpecialPrimaries<'data>
Source§fn eq(&self, other: &CollationSpecialPrimaries<'data>) -> bool
fn eq(&self, other: &CollationSpecialPrimaries<'data>) -> bool
self and other values to be equal, and is used by ==.Source§impl<'a> Yokeable<'a> for CollationSpecialPrimaries<'static>
impl<'a> Yokeable<'a> for CollationSpecialPrimaries<'static>
Source§type Output = CollationSpecialPrimaries<'a>
type Output = CollationSpecialPrimaries<'a>
Self with the 'static replaced with 'a, i.e. Self<'a>Source§fn transform(
&'a self,
) -> &'a <CollationSpecialPrimaries<'static> as Yokeable<'a>>::Output
fn transform( &'a self, ) -> &'a <CollationSpecialPrimaries<'static> as Yokeable<'a>>::Output
Source§fn transform_owned(
self,
) -> <CollationSpecialPrimaries<'static> as Yokeable<'a>>::Output
fn transform_owned( self, ) -> <CollationSpecialPrimaries<'static> as Yokeable<'a>>::Output
Source§unsafe fn make(
this: <CollationSpecialPrimaries<'static> as Yokeable<'a>>::Output,
) -> CollationSpecialPrimaries<'static>
unsafe fn make( this: <CollationSpecialPrimaries<'static> as Yokeable<'a>>::Output, ) -> CollationSpecialPrimaries<'static>
Self<'a>’s lifetime. Read moreSource§fn transform_mut<F>(&'a mut self, f: F)where
F: 'static + for<'b> FnOnce(&'b mut <CollationSpecialPrimaries<'static> as Yokeable<'a>>::Output),
fn transform_mut<F>(&'a mut self, f: F)where
F: 'static + for<'b> FnOnce(&'b mut <CollationSpecialPrimaries<'static> as Yokeable<'a>>::Output),
self between &'a mut Self<'static> and &'a mut Self<'a>,
and pass it to f. Read moreSource§impl<'zf, 'zf_inner> ZeroFrom<'zf, CollationSpecialPrimaries<'zf_inner>> for CollationSpecialPrimaries<'zf>
impl<'zf, 'zf_inner> ZeroFrom<'zf, CollationSpecialPrimaries<'zf_inner>> for CollationSpecialPrimaries<'zf>
Source§fn zero_from(
this: &'zf CollationSpecialPrimaries<'zf_inner>,
) -> CollationSpecialPrimaries<'zf>
fn zero_from( this: &'zf CollationSpecialPrimaries<'zf_inner>, ) -> CollationSpecialPrimaries<'zf>
C into a struct that may retain references into C.impl<'data> StructuralPartialEq for CollationSpecialPrimaries<'data>
Auto Trait Implementations§
impl<'data> Freeze for CollationSpecialPrimaries<'data>
impl<'data> RefUnwindSafe for CollationSpecialPrimaries<'data>
impl<'data> Send for CollationSpecialPrimaries<'data>
impl<'data> Sync for CollationSpecialPrimaries<'data>
impl<'data> Unpin for CollationSpecialPrimaries<'data>
impl<'data> UnwindSafe for CollationSpecialPrimaries<'data>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more