Struct icu_properties::HangulSyllableType
source · #[repr(transparent)]pub struct HangulSyllableType(pub u8);
Expand description
Enumerated property Hangul_Syllable_Type
The Unicode standard provides both precomposed Hangul syllables and conjoining Jamo to compose arbitrary Hangul syllables. This property provies that ontology of Hangul code points.
For more information, see the Unicode Korean FAQ.
Tuple Fields§
§0: u8
Implementations§
source§impl HangulSyllableType
impl HangulSyllableType
sourcepub const NotApplicable: HangulSyllableType = _
pub const NotApplicable: HangulSyllableType = _
(NA
) not applicable (e.g. not a Hangul code point).
sourcepub const LeadingJamo: HangulSyllableType = _
pub const LeadingJamo: HangulSyllableType = _
(L
) a conjoining leading consonant Jamo.
sourcepub const VowelJamo: HangulSyllableType = _
pub const VowelJamo: HangulSyllableType = _
(V
) a conjoining vowel Jamo.
sourcepub const TrailingJamo: HangulSyllableType = _
pub const TrailingJamo: HangulSyllableType = _
(T
) a conjoining trailing consonent Jamo.
sourcepub const LeadingVowelSyllable: HangulSyllableType = _
pub const LeadingVowelSyllable: HangulSyllableType = _
(LV
) a precomposed syllable with a leading consonant and a vowel.
sourcepub const LeadingVowelTrailingSyllable: HangulSyllableType = _
pub const LeadingVowelTrailingSyllable: HangulSyllableType = _
(LVT
) a precomposed syllable with a leading consonant, a vowel, and a trailing consonant.
source§impl HangulSyllableType
impl HangulSyllableType
sourcepub const fn name_to_enum_mapper() -> PropertyValueNameToEnumMapperBorrowed<'static, HangulSyllableType>
pub const fn name_to_enum_mapper() -> PropertyValueNameToEnumMapperBorrowed<'static, HangulSyllableType>
Return a PropertyValueNameToEnumMapper
, capable of looking up values
from strings for the Bidi_Class
enumerated property
✨ Enabled with the compiled_data
Cargo feature.
§Example
use icu::properties::HangulSyllableType;
let lookup = HangulSyllableType::name_to_enum_mapper();
// short name for value
assert_eq!(lookup.get_strict("L"), Some(HangulSyllableType::LeadingJamo));
assert_eq!(lookup.get_strict("LV"), Some(HangulSyllableType::LeadingVowelSyllable));
// long name for value
assert_eq!(lookup.get_strict("Leading_Jamo"), Some(HangulSyllableType::LeadingJamo));
assert_eq!(lookup.get_strict("LV_Syllable"), Some(HangulSyllableType::LeadingVowelSyllable));
// name has incorrect casing
assert_eq!(lookup.get_strict("lv"), None);
// loose matching of name
assert_eq!(lookup.get_loose("lv"), Some(HangulSyllableType::LeadingVowelSyllable));
// fake property
assert_eq!(lookup.get_strict("LT_Syllable"), None);
sourcepub fn get_name_to_enum_mapper(
provider: &(impl DataProvider<HangulSyllableTypeNameToValueV1Marker> + ?Sized),
) -> Result<PropertyValueNameToEnumMapper<HangulSyllableType>, PropertiesError>
pub fn get_name_to_enum_mapper( provider: &(impl DataProvider<HangulSyllableTypeNameToValueV1Marker> + ?Sized), ) -> Result<PropertyValueNameToEnumMapper<HangulSyllableType>, PropertiesError>
A version of HangulSyllableType::name_to_enum_mapper()
that uses custom data provided by a DataProvider
.
sourcepub const fn enum_to_short_name_mapper() -> PropertyEnumToValueNameLinearMapperBorrowed<'static, HangulSyllableType>
pub const fn enum_to_short_name_mapper() -> PropertyEnumToValueNameLinearMapperBorrowed<'static, HangulSyllableType>
Return a PropertyEnumToValueNameLinearMapper
, capable of looking up short names
for values of the Bidi_Class
enumerated property
✨ Enabled with the compiled_data
Cargo feature.
§Example
use icu::properties::HangulSyllableType;
let lookup = HangulSyllableType::enum_to_short_name_mapper();
assert_eq!(lookup.get(HangulSyllableType::LeadingJamo), Some("L"));
assert_eq!(lookup.get(HangulSyllableType::LeadingVowelSyllable), Some("LV"));
sourcepub fn get_enum_to_short_name_mapper(
provider: &(impl DataProvider<HangulSyllableTypeValueToShortNameV1Marker> + ?Sized),
) -> Result<PropertyEnumToValueNameLinearMapper<HangulSyllableType>, PropertiesError>
pub fn get_enum_to_short_name_mapper( provider: &(impl DataProvider<HangulSyllableTypeValueToShortNameV1Marker> + ?Sized), ) -> Result<PropertyEnumToValueNameLinearMapper<HangulSyllableType>, PropertiesError>
A version of HangulSyllableType::enum_to_short_name_mapper()
that uses custom data provided by a DataProvider
.
sourcepub const fn enum_to_long_name_mapper() -> PropertyEnumToValueNameLinearMapperBorrowed<'static, HangulSyllableType>
pub const fn enum_to_long_name_mapper() -> PropertyEnumToValueNameLinearMapperBorrowed<'static, HangulSyllableType>
Return a PropertyEnumToValueNameLinearMapper
, capable of looking up long names
for values of the Bidi_Class
enumerated property
✨ Enabled with the compiled_data
Cargo feature.
§Example
use icu::properties::HangulSyllableType;
let lookup = HangulSyllableType::enum_to_long_name_mapper();
assert_eq!(lookup.get(HangulSyllableType::LeadingJamo), Some("Leading_Jamo"));
assert_eq!(lookup.get(HangulSyllableType::LeadingVowelSyllable), Some("LV_Syllable"));
sourcepub fn get_enum_to_long_name_mapper(
provider: &(impl DataProvider<HangulSyllableTypeValueToLongNameV1Marker> + ?Sized),
) -> Result<PropertyEnumToValueNameLinearMapper<HangulSyllableType>, PropertiesError>
pub fn get_enum_to_long_name_mapper( provider: &(impl DataProvider<HangulSyllableTypeValueToLongNameV1Marker> + ?Sized), ) -> Result<PropertyEnumToValueNameLinearMapper<HangulSyllableType>, PropertiesError>
A version of HangulSyllableType::enum_to_long_name_mapper()
that uses custom data provided by a DataProvider
.
Trait Implementations§
source§impl AsULE for HangulSyllableType
impl AsULE for HangulSyllableType
source§type ULE = HangulSyllableTypeULE
type ULE = HangulSyllableTypeULE
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 HangulSyllableType
impl Clone for HangulSyllableType
source§fn clone(&self) -> HangulSyllableType
fn clone(&self) -> HangulSyllableType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for HangulSyllableType
impl Debug for HangulSyllableType
source§impl Hash for HangulSyllableType
impl Hash for HangulSyllableType
source§impl Ord for HangulSyllableType
impl Ord for HangulSyllableType
source§fn cmp(&self, other: &HangulSyllableType) -> Ordering
fn cmp(&self, other: &HangulSyllableType) -> 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 HangulSyllableType
impl PartialEq for HangulSyllableType
source§impl PartialOrd for HangulSyllableType
impl PartialOrd for HangulSyllableType
source§impl TrieValue for HangulSyllableType
impl TrieValue for HangulSyllableType
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 HangulSyllableType
impl<'a> ZeroMapKV<'a> for HangulSyllableType
source§type Container = ZeroVec<'a, HangulSyllableType>
type Container = ZeroVec<'a, HangulSyllableType>
ZeroVec
or VarZeroVec
.type Slice = ZeroSlice<HangulSyllableType>
source§type GetType = HangulSyllableTypeULE
type GetType = HangulSyllableTypeULE
Container::get()
Read moresource§type OwnedType = HangulSyllableType
type OwnedType = HangulSyllableType
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 HangulSyllableType
impl Eq for HangulSyllableType
impl StructuralPartialEq for HangulSyllableType
Auto Trait Implementations§
impl Freeze for HangulSyllableType
impl RefUnwindSafe for HangulSyllableType
impl Send for HangulSyllableType
impl Sync for HangulSyllableType
impl Unpin for HangulSyllableType
impl UnwindSafe for HangulSyllableType
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
)