pub enum ThemeError {
Show 13 variants
BackgroundDetectionFailed,
ColorSupportMismatch {
required: ColorSupport,
available: ColorSupport,
},
DarkThemeLightTerm,
InsufficientColorSupport,
InvalidAnsiCode(String),
InvalidColorSupport(String),
InvalidColorValue(String),
InvalidStyle(String),
InvalidTermBgLuma(String),
LightThemeDarkTerm,
NoValidBackground(String),
TermBgLumaMismatch {
theme: TermBgLuma,
terminal: TermBgLuma,
},
UnknownTheme(String),
}Expand description
Theme-related error types
Variants§
BackgroundDetectionFailed
Failed to detect terminal background color
ColorSupportMismatch
Color support mismatch between theme requirements and terminal capabilities
Fields
required: ColorSupportThe color support level required by the theme
available: ColorSupportThe color support level available in the terminal
DarkThemeLightTerm
Attempted to use a dark theme with a light terminal background
InsufficientColorSupport
Terminal does not support sufficient colors for the requested operation
InvalidAnsiCode(String)
Invalid ANSI escape code format
InvalidColorSupport(String)
Invalid color support specification
InvalidColorValue(String)
Invalid color value format or specification
InvalidStyle(String)
Invalid style attribute specification
InvalidTermBgLuma(String)
Invalid terminal background luminance value
LightThemeDarkTerm
Attempted to use a light theme with a dark terminal background
NoValidBackground(String)
No valid background color found for the specified theme
TermBgLumaMismatch
Terminal background luminance mismatch with theme requirements
Fields
theme: TermBgLumaThe background luminance required by the theme
terminal: TermBgLumaThe actual background luminance of the terminal
UnknownTheme(String)
Unknown or unrecognized theme name
Trait Implementations§
Source§impl Debug for ThemeError
impl Debug for ThemeError
Source§impl Display for ThemeError
impl Display for ThemeError
Source§impl Error for ThemeError
impl Error for ThemeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<ThemeError> for StylingError
impl From<ThemeError> for StylingError
Source§fn from(source: ThemeError) -> Self
fn from(source: ThemeError) -> Self
Auto Trait Implementations§
impl Freeze for ThemeError
impl RefUnwindSafe for ThemeError
impl Send for ThemeError
impl Sync for ThemeError
impl Unpin for ThemeError
impl UnwindSafe for ThemeError
Blanket Implementations§
Source§impl<T> AnsiStyleExt for Twhere
T: Display,
impl<T> AnsiStyleExt for Twhere
T: Display,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more