pub enum ColorParserError {
InvalidLength,
InvalidCharacter,
InvalidRgbValue,
}Expand description
Errors that can occur during color parsing or conversion.
Variants§
InvalidLength
Invalid hex string length (must be 3, 4, 6, or 8 characters)
InvalidCharacter
Invalid character in hex string
InvalidRgbValue
RGB values must be in the 0–255 range
Trait Implementations§
Source§impl Debug for ColorParserError
impl Debug for ColorParserError
Source§impl Display for ColorParserError
impl Display for ColorParserError
Source§impl Error for ColorParserError
impl Error for ColorParserError
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 ColorParserError
impl RefUnwindSafe for ColorParserError
impl Send for ColorParserError
impl Sync for ColorParserError
impl Unpin for ColorParserError
impl UnwindSafe for ColorParserError
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