Struct icu::casemap::provider::data::CaseMapDataULE

source ยท
pub struct CaseMapDataULE(/* private fields */);
Expand description

Packed casemappingdata type

Data format, copied from ICU4C casepropsbuilder.cpp:

Trie data word:
Bits
if(exception) {
    15..4   unsigned exception index
} else {
    if(not uncased) {
        15..7   signed delta to simple case mapping code point
                (add delta to input code point)
    } else {
        15..7   reserved, 0
    }
     6..5   0 normal character with cc=0
            1 soft-dotted character
            2 cc=230
            3 other cc
            The runtime code relies on these two bits to be adjacent with this encoding.
}
    4   case-sensitive
    3   exception
    2   case-ignorable
 1..0   0 uncased
        1 lowercase
        2 uppercase
        3 titlecase
        The runtime code relies on the case-ignorable and case type bits 2..0
        to be the lowest bits with this encoding.
๐Ÿšง 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.

Trait Implementationsยง

sourceยง

impl Clone for CaseMapDataULE

sourceยง

fn clone(&self) -> CaseMapDataULE

Returns a copy of the value. Read more
1.0.0 ยท sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
sourceยง

impl Debug for CaseMapDataULE

sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
sourceยง

impl PartialEq for CaseMapDataULE

sourceยง

fn eq(&self, other: &CaseMapDataULE) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 ยท sourceยง

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
sourceยง

impl ULE for CaseMapDataULE

ยงSafety

Safety checklist for ULE:

  1. The type must not include any uninitialized or padding bytes: repr(transparent) wrapper around ULE type
  2. The type must have an alignment of 1 byte: repr(transparent) wrapper around ULE type
  3. The impl of ULE::validate_bytes() must return an error if the given byte slice would not represent a valid slice of this type: It does
  4. The impl of ULE::validate_bytes() must return an error if the given byte slice cannot be used in its entirety (if its length is not a multiple of size_of::<Self>()): it does, due to the RawBytesULE parse call
  5. All other methods must be left with their default impl, or else implemented according to their respective safety guidelines: They have been
  6. The equality invariant is satisfied
sourceยง

fn validate_bytes(bytes: &[u8]) -> Result<(), UleError>

Validates a byte slice, &[u8]. Read more
sourceยง

fn parse_bytes_to_slice(bytes: &[u8]) -> Result<&[Self], UleError>

Parses a byte slice, &[u8], and return it as &[Self] with the same lifetime. Read more
sourceยง

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
sourceยง

fn slice_as_bytes(slice: &[Self]) -> &[u8] โ“˜

Given &[Self], returns a &[u8] with the same lifetime. Read more
sourceยง

impl Copy for CaseMapDataULE

sourceยง

impl Eq for CaseMapDataULE

sourceยง

impl StructuralPartialEq for CaseMapDataULE

Auto Trait Implementationsยง

Blanket Implementationsยง

sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
sourceยง

impl<T> CloneToUninit for T
where T: Clone,

sourceยง

unsafe fn clone_to_uninit(&self, dst: *mut T)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
sourceยง

impl<T> From<T> for T

sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

sourceยง

impl<T> IntoEither for T

sourceยง

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 more
sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
sourceยง

impl<T> ToOwned for T
where T: Clone,

sourceยง

type Owned = T

The resulting type after obtaining ownership.
sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
sourceยง

impl<T> ErasedDestructor for T
where T: 'static,

sourceยง

impl<T> MaybeSendSync for T
where T: Send + Sync,