#[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§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 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 more