Struct icu_casemap::provider::exception_helpers::ExceptionBitsULE
source ยท #[repr(transparent)]pub struct ExceptionBitsULE(pub u8);
Expand description
The bitflags on an exception header.
Format from icu4c, documented in casepropsbuilder.cpp, shifted 8 bits since ICU4C has this packed alongside a SlotPresence
0 Double-width slots. If set, then each optional slot is stored as two
elements of the array (high and low halves of 32-bit values) instead of
a single element.
1 Has no simple case folding, even if there is a simple lowercase mapping
2 The value in the delta slot is negative
3 Is case-sensitive (not exposed)
4..5 Dot type
6 Has conditional special casing
7 Has conditional case folding
All bits are valid, though in ICU4X data bits 0 and 2 are not used
๐ง This code is considered unstable; it may change at any time, in breaking or non-breaking ways,
including in SemVer minor releases. While the serde representation of data structs is guaranteed
to be stable, their Rust representation might not be. Use with caution.
Tuple Fieldsยง
ยง0: u8
Implementationsยง
sourceยงimpl ExceptionBitsULE
impl ExceptionBitsULE
const DOUBLE_SLOTS_FLAG: u8 = 1u8
const NO_SIMPLE_CASE_FOLDING_FLAG: u8 = 2u8
const NEGATIVE_DELTA_FLAG: u8 = 4u8
const SENSITIVE_FLAG: u8 = 8u8
const DOT_SHIFT: u8 = 4u8
const CONDITIONAL_SPECIAL_FLAG: u8 = 64u8
const CONDITIONAL_FOLD_FLAG: u8 = 128u8
sourceยงimpl ExceptionBitsULE
impl ExceptionBitsULE
sourcepub fn double_width_slots(self) -> bool
pub fn double_width_slots(self) -> bool
Whether or not the slots are double-width.
Unused in ICU4X
sourcepub fn no_simple_case_folding(self) -> bool
pub fn no_simple_case_folding(self) -> bool
There is no simple casefolding, even if there is a simple lowercase mapping
sourcepub fn negative_delta(self) -> bool
pub fn negative_delta(self) -> bool
The delta stored in the Delta
slot is negative
sourcepub fn is_sensitive(self) -> bool
pub fn is_sensitive(self) -> bool
If the character is case sensitive
sourcepub fn has_conditional_special(self) -> bool
pub fn has_conditional_special(self) -> bool
If the character has conditional special casing
sourcepub fn has_conditional_fold(self) -> bool
pub fn has_conditional_fold(self) -> bool
If the character has conditional case folding
Trait Implementationsยง
sourceยงimpl Clone for ExceptionBitsULE
impl Clone for ExceptionBitsULE
sourceยงfn clone(&self) -> ExceptionBitsULE
fn clone(&self) -> ExceptionBitsULE
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 ExceptionBitsULE
impl Debug for ExceptionBitsULE
sourceยงimpl PartialEq for ExceptionBitsULE
impl PartialEq for ExceptionBitsULE
sourceยงimpl ULE for ExceptionBitsULE
impl ULE for ExceptionBitsULE
sourceยงfn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
fn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
Validates a byte slice,
&[u8]
. Read moresourceยงfn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
fn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
sourceยงunsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]
unsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]
Takes a byte slice,
&[u8]
, and return it as &[Self]
with the same lifetime, assuming
that this byte slice has previously been run through Self::parse_byte_slice()
with
success. Read moreimpl Copy for ExceptionBitsULE
impl Eq for ExceptionBitsULE
impl StructuralPartialEq for ExceptionBitsULE
Auto Trait Implementationsยง
impl Freeze for ExceptionBitsULE
impl RefUnwindSafe for ExceptionBitsULE
impl Send for ExceptionBitsULE
impl Sync for ExceptionBitsULE
impl Unpin for ExceptionBitsULE
impl UnwindSafe for ExceptionBitsULE
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
)