pub enum WordError {
BlockError(BlockError),
JamoError(JamoError),
CouldNotStartNewBlock(char, BlockPushResult),
NothingToPop,
CannotCompleteCurrentBlock(Jamo),
}Expand description
A composer for a single Hangul word, made up of multiple syllable blocks.
Variants§
BlockError(BlockError)
Occurs when there is an error related to syllable blocks.
JamoError(JamoError)
Occurs when there is an error related to Jamo letters.
CouldNotStartNewBlock(char, BlockPushResult)
Tried to start a new block while pushing Jamo, but it was not possible.
The reason is provided in the BlockPushResult.
NothingToPop
Tried popping from an empty word (no Jamo to pop).
CannotCompleteCurrentBlock(Jamo)
Tried to complete the current block, but it only contains one Jamo.
Trait Implementations§
impl Eq for WordError
Source§impl Error for WordError
impl Error for WordError
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<WordError> for StringError
impl From<WordError> for StringError
impl StructuralPartialEq for WordError
Auto Trait Implementations§
impl Freeze for WordError
impl RefUnwindSafe for WordError
impl Send for WordError
impl Sync for WordError
impl Unpin for WordError
impl UnsafeUnpin for WordError
impl UnwindSafe for WordError
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