pub enum RichError {
ColorParse(String),
StyleSyntax(String),
Markup(String),
Json(String),
Regex(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.
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)>
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()
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.