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_bytes(bytes: &[u8]) -> Result<(), UleError>
fn validate_bytes(bytes: &[u8]) -> Result<(), UleError>
Validates a byte slice,
&[u8]
. Read moreยงfn parse_bytes_to_slice(bytes: &[u8]) -> Result<&[Self], UleError>
fn parse_bytes_to_slice(bytes: &[u8]) -> Result<&[Self], UleError>
ยงunsafe fn slice_from_bytes_unchecked(bytes: &[u8]) -> &[Self]
unsafe fn slice_from_bytes_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_bytes_to_slice()
] with
success. Read moreยงfn slice_as_bytes(slice: &[Self]) -> &[u8] โ
fn slice_as_bytes(slice: &[Self]) -> &[u8] โ
impl 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