pub enum BlockError {
JamoError(JamoError),
InvalidBlockRepresentation(u32),
InvalidJamoContext(Jamo, JamoPosition, JamoUnicodeType),
InvalidComponentRepresentation(u32),
JamoInInvalidPosition(Jamo, JamoPosition),
}Expand description
Errors that can occur when working with Hangul syllable blocks.
Variants§
JamoError(JamoError)
An error related to Jamo operations.
InvalidBlockRepresentation(u32)
Occurs when a codepoint to represent a Hangul syllable block is invalid. This happens when converting a block to a codepoint, or when trying to create a block from a codepoint that does not correspond to a valid Hangul syllable.
InvalidJamoContext(Jamo, JamoPosition, JamoUnicodeType)
Occurs when a Jamo letter is not valid in the context of Hangul syllable composition, given its position and the Unicode era (modern or compatibility) being used.
InvalidComponentRepresentation(u32)
Occurs when a codepoint meant to represent a Jamo letter is invalid and cannot be used in Hangul syllable composition or decomposition.
JamoInInvalidPosition(Jamo, JamoPosition)
Occurs when a Jamo letter is in an invalid position for Hangul; for example, a vowel in the initial position.
Trait Implementations§
Source§impl Debug for BlockError
impl Debug for BlockError
Source§impl Display for BlockError
impl Display for BlockError
Source§impl Error for BlockError
impl Error for BlockError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<BlockError> for WordError
impl From<BlockError> for WordError
Source§fn from(source: BlockError) -> Self
fn from(source: BlockError) -> Self
Converts to this type from the input type.
Source§impl From<JamoError> for BlockError
impl From<JamoError> for BlockError
Source§impl PartialEq for BlockError
impl PartialEq for BlockError
impl Eq for BlockError
impl StructuralPartialEq for BlockError
Auto Trait Implementations§
impl Freeze for BlockError
impl RefUnwindSafe for BlockError
impl Send for BlockError
impl Sync for BlockError
impl Unpin for BlockError
impl UnwindSafe for BlockError
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