Struct rug::rational::ParseRationalError [] [src]

pub struct ParseRationalError { /* fields omitted */ }

An error which can be returned when parsing a Rational number.

Examples

use rug::Rational;
use rug::rational::ParseRationalError;
// This string is not a rational number.
let s = "something completely different (_!_!_)";
let error: ParseRationalError = match Rational::parse_radix(s, 4) {
    Ok(_) => unreachable!(),
    Err(error) => error,
};
println!("Parse error: {:?}", error);

Trait Implementations

impl Debug for ParseRationalError
[src]

[src]

Formats the value using the given formatter.

impl Error for ParseRationalError
[src]

[src]

A short description of the error. Read more

1.0.0
[src]

The lower-level cause of this error, if any. Read more

impl Display for ParseRationalError
[src]

[src]

Formats the value using the given formatter. Read more