Struct icu_properties::CanonicalCombiningClass
source · #[repr(transparent)]pub struct CanonicalCombiningClass(pub u8);
Expand description
Property Canonical_Combining_Class. See UAX #15: https://www.unicode.org/reports/tr15/.
See icu::normalizer::properties::CanonicalCombiningClassMap
for the API
to look up the Canonical_Combining_Class property by scalar value.
Tuple Fields§
§0: u8
Implementations§
source§impl CanonicalCombiningClass
impl CanonicalCombiningClass
pub const NotReordered: CanonicalCombiningClass = _
pub const Overlay: CanonicalCombiningClass = _
pub const HanReading: CanonicalCombiningClass = _
pub const Nukta: CanonicalCombiningClass = _
pub const KanaVoicing: CanonicalCombiningClass = _
pub const Virama: CanonicalCombiningClass = _
pub const CCC10: CanonicalCombiningClass = _
pub const CCC11: CanonicalCombiningClass = _
pub const CCC12: CanonicalCombiningClass = _
pub const CCC13: CanonicalCombiningClass = _
pub const CCC14: CanonicalCombiningClass = _
pub const CCC15: CanonicalCombiningClass = _
pub const CCC16: CanonicalCombiningClass = _
pub const CCC17: CanonicalCombiningClass = _
pub const CCC18: CanonicalCombiningClass = _
pub const CCC19: CanonicalCombiningClass = _
pub const CCC20: CanonicalCombiningClass = _
pub const CCC21: CanonicalCombiningClass = _
pub const CCC22: CanonicalCombiningClass = _
pub const CCC23: CanonicalCombiningClass = _
pub const CCC24: CanonicalCombiningClass = _
pub const CCC25: CanonicalCombiningClass = _
pub const CCC26: CanonicalCombiningClass = _
pub const CCC27: CanonicalCombiningClass = _
pub const CCC28: CanonicalCombiningClass = _
pub const CCC29: CanonicalCombiningClass = _
pub const CCC30: CanonicalCombiningClass = _
pub const CCC31: CanonicalCombiningClass = _
pub const CCC32: CanonicalCombiningClass = _
pub const CCC33: CanonicalCombiningClass = _
pub const CCC34: CanonicalCombiningClass = _
pub const CCC35: CanonicalCombiningClass = _
pub const CCC36: CanonicalCombiningClass = _
pub const CCC84: CanonicalCombiningClass = _
pub const CCC91: CanonicalCombiningClass = _
pub const CCC103: CanonicalCombiningClass = _
pub const CCC107: CanonicalCombiningClass = _
pub const CCC118: CanonicalCombiningClass = _
pub const CCC122: CanonicalCombiningClass = _
pub const CCC129: CanonicalCombiningClass = _
pub const CCC130: CanonicalCombiningClass = _
pub const CCC132: CanonicalCombiningClass = _
pub const CCC133: CanonicalCombiningClass = _
pub const AttachedBelowLeft: CanonicalCombiningClass = _
pub const AttachedBelow: CanonicalCombiningClass = _
pub const AttachedAbove: CanonicalCombiningClass = _
pub const AttachedAboveRight: CanonicalCombiningClass = _
pub const BelowLeft: CanonicalCombiningClass = _
pub const Below: CanonicalCombiningClass = _
pub const BelowRight: CanonicalCombiningClass = _
pub const Left: CanonicalCombiningClass = _
pub const Right: CanonicalCombiningClass = _
pub const AboveLeft: CanonicalCombiningClass = _
pub const Above: CanonicalCombiningClass = _
pub const AboveRight: CanonicalCombiningClass = _
pub const DoubleBelow: CanonicalCombiningClass = _
pub const DoubleAbove: CanonicalCombiningClass = _
pub const IotaSubscript: CanonicalCombiningClass = _
source§impl CanonicalCombiningClass
impl CanonicalCombiningClass
sourcepub const fn name_to_enum_mapper() -> PropertyValueNameToEnumMapperBorrowed<'static, CanonicalCombiningClass>
pub const fn name_to_enum_mapper() -> PropertyValueNameToEnumMapperBorrowed<'static, CanonicalCombiningClass>
Return a PropertyValueNameToEnumMapper
, capable of looking up values
from strings for the Canonical_Combining_Class
enumerated property.
✨ Enabled with the compiled_data
Cargo feature.
§Example
use icu::properties::CanonicalCombiningClass;
let lookup = CanonicalCombiningClass::name_to_enum_mapper();
// short name for value
assert_eq!(lookup.get_strict("AL"), Some(CanonicalCombiningClass::AboveLeft));
assert_eq!(lookup.get_strict("ATBL"), Some(CanonicalCombiningClass::AttachedBelowLeft));
assert_eq!(lookup.get_strict("CCC10"), Some(CanonicalCombiningClass::CCC10));
// long name for value
assert_eq!(lookup.get_strict("Above_Left"), Some(CanonicalCombiningClass::AboveLeft));
assert_eq!(lookup.get_strict("Attached_Below_Left"), Some(CanonicalCombiningClass::AttachedBelowLeft));
// name has incorrect casing and hyphens
assert_eq!(lookup.get_strict("attached-below-left"), None);
// loose matching of name
assert_eq!(lookup.get_loose("attached-below-left"), Some(CanonicalCombiningClass::AttachedBelowLeft));
// fake property
assert_eq!(lookup.get_strict("Linear_Z"), None);
sourcepub fn get_name_to_enum_mapper(
provider: &(impl DataProvider<CanonicalCombiningClassNameToValueV1Marker> + ?Sized),
) -> Result<PropertyValueNameToEnumMapper<CanonicalCombiningClass>, PropertiesError>
pub fn get_name_to_enum_mapper( provider: &(impl DataProvider<CanonicalCombiningClassNameToValueV1Marker> + ?Sized), ) -> Result<PropertyValueNameToEnumMapper<CanonicalCombiningClass>, PropertiesError>
A version of CanonicalCombiningClass::name_to_enum_mapper()
that uses custom data provided by a DataProvider
.
sourcepub const fn enum_to_short_name_mapper() -> PropertyEnumToValueNameSparseMapperBorrowed<'static, CanonicalCombiningClass>
pub const fn enum_to_short_name_mapper() -> PropertyEnumToValueNameSparseMapperBorrowed<'static, CanonicalCombiningClass>
Return a PropertyEnumToValueNameSparseMapper
, capable of looking up short names
for values of the Canonical_Combining_Class
enumerated property.
✨ Enabled with the compiled_data
Cargo feature.
§Example
use icu::properties::CanonicalCombiningClass;
let lookup = CanonicalCombiningClass::enum_to_short_name_mapper();
assert_eq!(lookup.get(CanonicalCombiningClass::AboveLeft), Some("AL"));
assert_eq!(lookup.get(CanonicalCombiningClass::AttachedBelowLeft), Some("ATBL"));
assert_eq!(lookup.get(CanonicalCombiningClass::CCC10), Some("CCC10"));
sourcepub fn get_enum_to_short_name_mapper(
provider: &(impl DataProvider<CanonicalCombiningClassValueToShortNameV1Marker> + ?Sized),
) -> Result<PropertyEnumToValueNameSparseMapper<CanonicalCombiningClass>, PropertiesError>
pub fn get_enum_to_short_name_mapper( provider: &(impl DataProvider<CanonicalCombiningClassValueToShortNameV1Marker> + ?Sized), ) -> Result<PropertyEnumToValueNameSparseMapper<CanonicalCombiningClass>, PropertiesError>
A version of CanonicalCombiningClass::enum_to_short_name_mapper()
that uses custom data provided by a DataProvider
.
sourcepub const fn enum_to_long_name_mapper() -> PropertyEnumToValueNameSparseMapperBorrowed<'static, CanonicalCombiningClass>
pub const fn enum_to_long_name_mapper() -> PropertyEnumToValueNameSparseMapperBorrowed<'static, CanonicalCombiningClass>
Return a PropertyEnumToValueNameSparseMapper
, capable of looking up long names
for values of the Canonical_Combining_Class
enumerated property.
✨ Enabled with the compiled_data
Cargo feature.
§Example
use icu::properties::CanonicalCombiningClass;
let lookup = CanonicalCombiningClass::enum_to_long_name_mapper();
assert_eq!(lookup.get(CanonicalCombiningClass::AboveLeft), Some("Above_Left"));
assert_eq!(lookup.get(CanonicalCombiningClass::AttachedBelowLeft), Some("Attached_Below_Left"));
assert_eq!(lookup.get(CanonicalCombiningClass::CCC10), Some("CCC10"));
sourcepub fn get_enum_to_long_name_mapper(
provider: &(impl DataProvider<CanonicalCombiningClassValueToLongNameV1Marker> + ?Sized),
) -> Result<PropertyEnumToValueNameSparseMapper<CanonicalCombiningClass>, PropertiesError>
pub fn get_enum_to_long_name_mapper( provider: &(impl DataProvider<CanonicalCombiningClassValueToLongNameV1Marker> + ?Sized), ) -> Result<PropertyEnumToValueNameSparseMapper<CanonicalCombiningClass>, PropertiesError>
A version of CanonicalCombiningClass::enum_to_long_name_mapper()
that uses custom data provided by a DataProvider
.
Trait Implementations§
source§impl AsULE for CanonicalCombiningClass
impl AsULE for CanonicalCombiningClass
source§type ULE = CanonicalCombiningClassULE
type ULE = CanonicalCombiningClassULE
Self
. Read moresource§fn to_unaligned(self) -> Self::ULE
fn to_unaligned(self) -> Self::ULE
source§fn from_unaligned(unaligned: Self::ULE) -> Self
fn from_unaligned(unaligned: Self::ULE) -> Self
source§impl Clone for CanonicalCombiningClass
impl Clone for CanonicalCombiningClass
source§fn clone(&self) -> CanonicalCombiningClass
fn clone(&self) -> CanonicalCombiningClass
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CanonicalCombiningClass
impl Debug for CanonicalCombiningClass
source§impl Hash for CanonicalCombiningClass
impl Hash for CanonicalCombiningClass
source§impl Ord for CanonicalCombiningClass
impl Ord for CanonicalCombiningClass
source§fn cmp(&self, other: &CanonicalCombiningClass) -> Ordering
fn cmp(&self, other: &CanonicalCombiningClass) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for CanonicalCombiningClass
impl PartialEq for CanonicalCombiningClass
source§impl PartialOrd for CanonicalCombiningClass
impl PartialOrd for CanonicalCombiningClass
source§impl TrieValue for CanonicalCombiningClass
impl TrieValue for CanonicalCombiningClass
source§type TryFromU32Error = TryFromIntError
type TryFromU32Error = TryFromIntError
source§fn try_from_u32(i: u32) -> Result<Self, Self::TryFromU32Error>
fn try_from_u32(i: u32) -> Result<Self, Self::TryFromU32Error>
u32
first.source§impl<'a> ZeroMapKV<'a> for CanonicalCombiningClass
impl<'a> ZeroMapKV<'a> for CanonicalCombiningClass
source§type Container = ZeroVec<'a, CanonicalCombiningClass>
type Container = ZeroVec<'a, CanonicalCombiningClass>
ZeroVec
or VarZeroVec
.type Slice = ZeroSlice<CanonicalCombiningClass>
source§type GetType = CanonicalCombiningClassULE
type GetType = CanonicalCombiningClassULE
Container::get()
Read moresource§type OwnedType = CanonicalCombiningClass
type OwnedType = CanonicalCombiningClass
Container::replace()
and Container::remove()
,
also used during deserialization. If Self
is human readable serialized,
deserializing to Self::OwnedType
should produce the same value once
passed through Self::owned_as_self()
Read moreimpl Copy for CanonicalCombiningClass
impl Eq for CanonicalCombiningClass
impl StructuralPartialEq for CanonicalCombiningClass
Auto Trait Implementations§
impl Freeze for CanonicalCombiningClass
impl RefUnwindSafe for CanonicalCombiningClass
impl Send for CanonicalCombiningClass
impl Sync for CanonicalCombiningClass
impl Unpin for CanonicalCombiningClass
impl UnwindSafe for CanonicalCombiningClass
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
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)
clone_to_uninit
)