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 core::convert::TryFrom;
use rug::{integer::TryFromIntegerError, Integer};
// 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 Clone for TryFromIntegerError[src]

impl Copy for TryFromIntegerError[src]

impl Debug for TryFromIntegerError[src]

impl Display for TryFromIntegerError[src]

impl Error for TryFromIntegerError[src]

Auto Trait Implementations

impl RefUnwindSafe for TryFromIntegerError

impl Send for TryFromIntegerError

impl Sync for TryFromIntegerError

impl Unpin for TryFromIntegerError

impl UnwindSafe for TryFromIntegerError

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Az for T[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedAs for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> OverflowingAs for T[src]

impl<T> SaturatingAs for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> UnwrappedAs for T[src]

impl<T> WrappingAs for T[src]