Struct icu_collator::elements::NonPrimary
source · pub(crate) struct NonPrimary(u32);
Expand description
The purpose of grouping the non-primary bits
into a struct is to allow for a future optimization
that specializes code over whether storage for primary
weights is needed or not. (I.e. whether to specialize
on CollationElement
or NonPrimary
.)
Tuple Fields§
§0: u32
Implementations§
source§impl NonPrimary
impl NonPrimary
sourcepub fn tertiary(&self) -> u16
pub fn tertiary(&self) -> u16
Get the tertiary weight as u16 with the high two bits of each half zeroed.
pub fn tertiary_ignorable(&self) -> bool
sourcepub fn quaternary(&self) -> u32
pub fn quaternary(&self) -> u32
Get the quaternary weight in the original storage bit positions with the other bits set to one.
sourcepub fn tertiary_case_quarternary(&self, mask: u16) -> u16
pub fn tertiary_case_quarternary(&self, mask: u16) -> u16
Get any combination of tertiary, case, and quaternary by mask.
pub fn case_quaternary(&self) -> u16
Trait Implementations§
source§impl Clone for NonPrimary
impl Clone for NonPrimary
source§fn clone(&self) -> NonPrimary
fn clone(&self) -> NonPrimary
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 moresource§impl Debug for NonPrimary
impl Debug for NonPrimary
source§impl Default for NonPrimary
impl Default for NonPrimary
source§impl PartialEq for NonPrimary
impl PartialEq for NonPrimary
source§fn eq(&self, other: &NonPrimary) -> bool
fn eq(&self, other: &NonPrimary) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for NonPrimary
impl StructuralPartialEq for NonPrimary
Auto Trait Implementations§
impl Freeze for NonPrimary
impl RefUnwindSafe for NonPrimary
impl Send for NonPrimary
impl Sync for NonPrimary
impl Unpin for NonPrimary
impl UnwindSafe for NonPrimary
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