pub enum RichError {
ColorParse(String),
StyleSyntax(String),
Markup(String),
Json(String),
Regex(String),
ThemeStack(String),
ThemeConfig(String),
}Expand description
Errors produced while parsing colors, styles, or markup.
Variants§
ColorParse(String)
A color could not be parsed (rich.errors.ColorParseError).
StyleSyntax(String)
A style definition could not be parsed (rich.errors.StyleSyntaxError).
Markup(String)
Console markup was malformed (rich.errors.MarkupError).
Json(String)
A JSON string could not be parsed (used by rich.json.JSON).
Regex(String)
A regular expression could not be compiled or run. Python has no rich
equivalent — it lets re.error propagate — but a caller-supplied pattern
has to fail somewhere, and returning it beats panicking.
ThemeStack(String)
The console’s base theme cannot be popped (rich.theme.ThemeStackError).
ThemeConfig(String)
A theme config file could not be read or parsed. Upstream surfaces
Python’s configparser errors (NoSectionError, DuplicateOptionError,
ParsingError, InterpolationSyntaxError) and OSError here.
Trait Implementations§
impl Eq for RichError
Source§impl Error for RichError
impl Error for RichError
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
use the Display impl or to_string()
impl StructuralPartialEq for RichError
Auto Trait Implementations§
impl Freeze for RichError
impl RefUnwindSafe for RichError
impl Send for RichError
impl Sync for RichError
impl Unpin for RichError
impl UnsafeUnpin for RichError
impl UnwindSafe for RichError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.