Struct gmp::mpq::Mpq[][src]

pub struct Mpq { /* fields omitted */ }

Implementations

impl Mpq[src]

pub unsafe fn inner(&self) -> mpq_srcptr[src]

pub unsafe fn inner_mut(&mut self) -> mpq_ptr[src]

pub fn new() -> Mpq[src]

pub fn ratio(num: &Mpz, den: &Mpz) -> Mpq[src]

pub fn from_str_radix(s: &str, base: u8) -> Result<Mpq, ParseMpqError>[src]

pub fn set(&mut self, other: &Mpq)[src]

pub fn set_z(&mut self, other: &Mpz)[src]

pub fn set_d(&mut self, other: f64)[src]

pub fn set_f(&mut self, other: &Mpf)[src]

pub fn get_num(&self) -> Mpz[src]

pub fn get_den(&self) -> Mpz[src]

pub fn abs(&self) -> Mpq[src]

pub fn invert(&self) -> Mpq[src]

pub fn floor(&self) -> Mpz[src]

pub fn ceil(&self) -> Mpz[src]

pub fn sign(&self) -> Sign[src]

pub fn one() -> Mpq[src]

pub fn zero() -> Mpq[src]

pub fn is_zero(&self) -> bool[src]

Trait Implementations

impl<'a> Add<&'a Mpq> for Mpq[src]

type Output = Mpq

The resulting type after applying the + operator.

impl<'a, 'b> Add<&'a Mpq> for &'b Mpq[src]

type Output = Mpq

The resulting type after applying the + operator.

impl Add<Mpq> for Mpq[src]

type Output = Mpq

The resulting type after applying the + operator.

impl<'a> Add<Mpq> for &'a Mpq[src]

type Output = Mpq

The resulting type after applying the + operator.

impl<'a> AddAssign<&'a Mpq> for Mpq[src]

impl<'a> AddAssign<Mpq> for Mpq[src]

impl Clone for Mpq[src]

impl Debug for Mpq[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Renders as numer/denom. If denom=1, renders as numer.

impl Display for Mpq[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Renders as numer/denom. If denom=1, renders as numer.

impl<'a> Div<&'a Mpq> for Mpq[src]

type Output = Mpq

The resulting type after applying the / operator.

impl<'a, 'b> Div<&'a Mpq> for &'b Mpq[src]

type Output = Mpq

The resulting type after applying the / operator.

impl Div<Mpq> for Mpq[src]

type Output = Mpq

The resulting type after applying the / operator.

impl<'a> Div<Mpq> for &'a Mpq[src]

type Output = Mpq

The resulting type after applying the / operator.

impl<'a> DivAssign<&'a Mpq> for Mpq[src]

impl<'a> DivAssign<Mpq> for Mpq[src]

impl Drop for Mpq[src]

impl Eq for Mpq[src]

impl<'a> From<&'a Mpz> for Mpq[src]

impl From<Mpz> for Mpq[src]

impl From<i32> for Mpq[src]

impl From<i64> for Mpq[src]

impl From<u32> for Mpq[src]

impl From<u64> for Mpq[src]

impl FromStr for Mpq[src]

type Err = ParseMpqError

The associated error which can be returned from parsing.

impl<'a> Mul<&'a Mpq> for Mpq[src]

type Output = Mpq

The resulting type after applying the * operator.

impl<'a, 'b> Mul<&'a Mpq> for &'b Mpq[src]

type Output = Mpq

The resulting type after applying the * operator.

impl Mul<Mpq> for Mpq[src]

type Output = Mpq

The resulting type after applying the * operator.

impl<'a> Mul<Mpq> for &'a Mpq[src]

type Output = Mpq

The resulting type after applying the * operator.

impl<'a> MulAssign<&'a Mpq> for Mpq[src]

impl<'a> MulAssign<Mpq> for Mpq[src]

impl<'b> Neg for &'b Mpq[src]

type Output = Mpq

The resulting type after applying the - operator.

impl Neg for Mpq[src]

type Output = Mpq

The resulting type after applying the - operator.

impl One for Mpq[src]

impl Ord for Mpq[src]

impl PartialEq<Mpq> for Mpq[src]

impl PartialOrd<Mpq> for Mpq[src]

impl Send for Mpq[src]

impl<'a> Sub<&'a Mpq> for Mpq[src]

type Output = Mpq

The resulting type after applying the - operator.

impl<'a, 'b> Sub<&'a Mpq> for &'b Mpq[src]

type Output = Mpq

The resulting type after applying the - operator.

impl Sub<Mpq> for Mpq[src]

type Output = Mpq

The resulting type after applying the - operator.

impl<'a> Sub<Mpq> for &'a Mpq[src]

type Output = Mpq

The resulting type after applying the - operator.

impl<'a> SubAssign<&'a Mpq> for Mpq[src]

impl<'a> SubAssign<Mpq> for Mpq[src]

impl Sync for Mpq[src]

impl Zero for Mpq[src]

Auto Trait Implementations

impl RefUnwindSafe for Mpq

impl Unpin for Mpq

impl UnwindSafe for Mpq

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.