Struct tdesktop_theme::ParseError
source · pub struct ParseError {
pub message: &'static str,
pub line: Option<usize>,
pub column: Option<usize>,
}
Expand description
Represents an error occured during parsing.
Reasons parsing may fail
- Absence of the file
colors.tdesktop-theme
if the parser was given an archive; - Bad formatting of the palette file (it’s
<variable>:<color>;
, with any number of whitespaces between tokens, and also C-style comments); - Wrong format of colors (they may only be
#rrggbb
or#rrggbbaa
); - Wrong format of variable names (they may only contain latin letters,
digits and the underscore symbol (
_
)).
Fields§
§message: &'static str
Contains a message explaining why parsing failed.
line: Option<usize>
If possible, the parser will report the line of the contents where parsing failed.
column: Option<usize>
If possible, the parser will report the column of the contents where parsing failed.
Trait Implementations§
source§impl Debug for ParseError
impl Debug for ParseError
source§impl Display for ParseError
impl Display for ParseError
source§impl Error for ParseError
impl Error for ParseError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()