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
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<(), UleError>
fn validate_byte_slice(bytes: &[u8]) -> Result<(), UleError>
Validates a byte slice,
&[u8]
. Read moresource§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
)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>
Converts
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>
Converts
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