pub enum WordError {
EmptyOrWhitespaceSegment,
LowercaseCharactersInSegment,
}Expand description
WordError represents specific errors that can occur when creating, validating, or manipulating a Word.
These errors typically arise from invalid input or attempts to create words that do not conform to expected rules.
Variants§
EmptyOrWhitespaceSegment
Indicates that a word segment (prefix, crossed character, or suffix) is empty or contains only whitespace.
LowercaseCharactersInSegment
Indicates that a word segment contains lowercase characters, which are not allowed.
Trait Implementations§
Source§impl Display for WordError
Implements the Display trait for WordError, allowing errors to be formatted as user-friendly strings.
impl Display for WordError
Implements the Display trait for WordError, allowing errors to be formatted as user-friendly strings.
Source§impl Error for WordError
Implements the Error trait for WordError, providing a common interface for error handling.
impl Error for WordError
Implements the Error trait for WordError, providing a common interface for error handling.
1.30.0 · 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()
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