Struct rug::integer::TryFromIntegerError [−][src]
pub struct TryFromIntegerError { /* fields omitted */ }
An error which can be returned when a checked conversion from
Integer
fails.
Examples
use rug::integer::TryFromIntegerError; use rug::Integer; use std::convert::TryFrom; // This is negative and cannot be converted to u32. let i = Integer::from(-5); let error: TryFromIntegerError = match u32::try_from(&i) { Ok(_) => unreachable!(), Err(error) => error, }; println!("Error: {}", error);
Trait Implementations
impl Error for TryFromIntegerError
[src]
impl Error for TryFromIntegerError
fn description(&self) -> &str
[src]
fn description(&self) -> &str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
1.0.0[src]
fn cause(&self) -> Option<&Error>
1.0.0
[src]The lower-level cause of this error, if any. Read more
impl Display for TryFromIntegerError
[src]
impl Display for TryFromIntegerError
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 Clone for TryFromIntegerError
[src]
impl Clone for TryFromIntegerError
fn clone(&self) -> TryFromIntegerError
[src]
fn clone(&self) -> TryFromIntegerError
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for TryFromIntegerError
[src]
impl Copy for TryFromIntegerError
impl Debug for TryFromIntegerError
[src]
impl Debug for TryFromIntegerError
Auto Trait Implementations
impl Send for TryFromIntegerError
impl Send for TryFromIntegerError
impl Sync for TryFromIntegerError
impl Sync for TryFromIntegerError