Enum py_literal::ParseError [−]
pub enum ParseError { Syntax(String), IllegalEscapeSequence(String), ParseFloat(ParseFloatError), NumericCast(String, String), }
Error parsing a Python literal.
Variants
Syntax(String)
A syntax error.
IllegalEscapeSequence(String)
An illegal escape sequence in a string or bytes literal.
ParseFloat(ParseFloatError)
An error parsing a float. This might happen if the mantissa or exponent in the float literal has too many digits.
NumericCast(String, String)
An error in a numeric cast. For example, this might occur while adding an integer and float if the integer is too large to fit in a float.
Trait Implementations
impl Debug for ParseError
[src]
impl Debug for ParseError
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Display for ParseError
impl Display for ParseError
impl Error for ParseError
impl Error for ParseError
fn description(&self) -> &str
fn description(&self) -> &str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl From<ParseFloatError> for ParseError
impl From<ParseFloatError> for ParseError
fn from(err: ParseFloatError) -> ParseError
fn from(err: ParseFloatError) -> ParseError
Performs the conversion.
Auto Trait Implementations
impl Send for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Sync for ParseError