Struct icu_collator::elements::CollationElement
source · pub(crate) struct CollationElement(u64);
Expand description
A collation element is a 64-bit value.
Bits 63..32 are the primary weight. Bits 31..16 are the secondary weight. Bits 15..14 are the case bits. Bits 13..8 and 5..0 are the (bitwise discontiguous) tertiary weight. Bits 7..6 the quaternary weight.
Tuple Fields§
§0: u64
Implementations§
source§impl CollationElement
impl CollationElement
pub fn new(bits: u64) -> Self
pub fn new_from_primary(primary: u32) -> Self
pub fn new_from_secondary(secondary: u16) -> Self
pub fn new_implicit_from_char(c: char) -> Self
pub fn clone_with_non_primary_zeroed(&self) -> Self
sourcepub fn non_primary(&self) -> NonPrimary
pub fn non_primary(&self) -> NonPrimary
Get the non-primary weights
pub fn quaternary(&self) -> u32
pub fn tertiary_ignorable(&self) -> bool
pub fn either_half_zero(&self) -> bool
pub const fn const_default() -> CollationElement
Trait Implementations§
source§impl Clone for CollationElement
impl Clone for CollationElement
source§fn clone(&self) -> CollationElement
fn clone(&self) -> CollationElement
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 CollationElement
impl Debug for CollationElement
source§impl Default for &CollationElement
impl Default for &CollationElement
source§impl Default for CollationElement
impl Default for CollationElement
source§impl PartialEq for CollationElement
impl PartialEq for CollationElement
impl Copy for CollationElement
impl StructuralPartialEq for CollationElement
Auto Trait Implementations§
impl Freeze for CollationElement
impl RefUnwindSafe for CollationElement
impl Send for CollationElement
impl Sync for CollationElement
impl Unpin for CollationElement
impl UnwindSafe for CollationElement
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)