pub struct HangulBlockDecompositionOptions {
pub decompose_composites: bool,
pub jamo_era: JamoUnicodeType,
}Expand description
Options for decomposing a HangulBlock into its constituent Jamo characters.
Example:
use hangul_cd::block::{HangulBlock, HangulBlockDecompositionOptions};
use hangul_cd::jamo::{Jamo, JamoUnicodeType};
let block = HangulBlock {
initial: Jamo::from_compatibility_jamo('ㄱ').unwrap(),
vowel: Jamo::from_compatibility_jamo('ㅘ').unwrap(),
final_optional: Some(Jamo::from_compatibility_jamo('ㄳ').unwrap()),
};
let options = HangulBlockDecompositionOptions {
decompose_composites: true,
jamo_era: JamoUnicodeType::Compatibility,
};
let decomposed = block.decomposed_vec(&options).unwrap();
assert_eq!(decomposed, vec!['ㄱ', 'ㅗ', 'ㅏ', 'ㄱ', 'ㅅ']);Fields§
§decompose_composites: boolWhether to decompose composite Jamo into their singular components.
jamo_era: JamoUnicodeTypeThe Unicode era of the Jamo characters to use in decomposition.
Auto Trait Implementations§
impl Freeze for HangulBlockDecompositionOptions
impl RefUnwindSafe for HangulBlockDecompositionOptions
impl Send for HangulBlockDecompositionOptions
impl Sync for HangulBlockDecompositionOptions
impl Unpin for HangulBlockDecompositionOptions
impl UnsafeUnpin for HangulBlockDecompositionOptions
impl UnwindSafe for HangulBlockDecompositionOptions
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